pike.git / lib / modules / Calendar.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/module.pmod:16:    "calendar_name", "calendar_object", "TimeRange",    "nulltimerange", "ruleset", "set_ruleset", "inano", "timezone",    "set_language", "default_rules", "TimeofDay",    "Second", "Fraction", "now", "Bahai" >);      array _indices()   {    return (array)magic;   }    - #include "localization.h" -  +    //! Time and day system   //!   //!@code   //!Q: I need to parse some date in a non-strict format, like   //! the one in the HTTP or mail protocol, or from a user web   //! form.   //!   //!A: Calendar.dwim_day, or Calendar.dwim_time, should solve   //! your problem.   //!
pike.git/lib/modules/Calendar.pmod/module.pmod:506: Inside #if 1
     // load ISO   // it can crash here if you're loading from compiled modules   // that is updated without all of the calendar module is updated    iso_utc=master()->resolv("Calendar")["ISO"];    iso_utc=iso_utc->set_timezone("UTC");    object Time = master()->resolv("Calendar")["Time"];    Time->Day = iso_utc->cDay;    stage--;    object tz= -  master()->resolv("Calendar")["Timezone"][default_timezone]; -  if (!tz) -  error("Failed to make default timezone %O\n",default_timezone); -  else +  master()->resolv("Calendar")["Timezone"]["locale"];    default_rules->timezone=tz; // destructive!    }    if ( !magic[what] || (stage && what!="default_rules")) return UNDEFINED;    switch (what)    {    case "Bahai":    return master()->resolv("Calendar")["Badi"];    case "ISO_UTC":    if (!iso_utc)    error("ERROR\n");    return iso_utc;    case "II":    return 1;    case "default_rules":    if (!default_rules)    {    default_rules=master()->resolv("Calendar")["Ruleset"](); -  default_rules=default_rules->set_language(default_language); +  default_rules=default_rules->set_language("ISO");    }    // load ISO_UTC and set timezone there   // if (!iso_utc) `[]("ISO_UTC");    // timezone will be set on the way out, through boot above    return default_rules;    }    if (!defcal)    {    if (!iso_utc) `[]("ISO_UTC");    stage++; -  defcal=master()->resolv("Calendar")[default_calendar]; +  defcal=master()->resolv("Calendar")["ISO"];    stage--;    }    return defcal[what];   }      protected mixed `-> (string what)   {    // This becomes an alias.    return `[] (what);   }   #endif