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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Ruleset.pike:1:   #pike __REAL_VERSION__      //! This is the container class for rules.    - .Rule.Timezone timezone; - .Rule.Language language; + Calendar.Rule.Timezone timezone; + Calendar.Rule.Language language;      mapping(string:string) abbr2zone=   ([    "AMT":"America/Manaus",    "AST":"America/Curacao",    "CDT":"America/Costa_Rica",    "CST":"America/El_Salvador",    "EST":"America/Panama",    "GST":"Asia/Dubai",    "IST":"Asia/Jerusalem",
pike.git/lib/modules/Calendar.pmod/Ruleset.pike:24:    "Eastern Daylight Time":"EDT",    "Eastern Standard Time":"EST",      // local languages       "MEZ":"CET",    "MESZ":"CEST",   ]);      //! - this_program set_timezone(string|.Rule.Timezone t) + this_program set_timezone(string|Calendar.Rule.Timezone t)   {    if (stringp(t)) {    string name = t; -  t=.Timezone[t]; +  t=Calendar.Timezone[t];    if (!t) error("No timezone %O\n",name);    }       if (!t->is_timezone)    error("Not a timezone: %O\n",t);       this_program r=clone();    r->timezone=t;    return r;   }      //! - this_program set_language(string|.Rule.Language lang) + this_program set_language(string|Calendar.Rule.Language lang)   {    this_program r=clone();    if (stringp(lang))    {    lang=master()->resolv("Calendar")["Language"][lang];    if (!lang) lang=master()->resolv("Calendar")["Language"]["ISO"];    }    if (!lang->is_language)    error("Not a language: %O\n",lang);    r->language=lang;
pike.git/lib/modules/Calendar.pmod/Ruleset.pike:80:   //! @seealso   //! @[YMD.parse]   this_program set_abbr2zone(mapping(string:string) abbr2zone)   {    this_program r=clone();    r->abbr2zone=abbr2zone;    return r;   }      //! - this_program set_rule(.Rule.Language|.Rule.Timezone rule) + this_program set_rule(Calendar.Rule.Language|Calendar.Rule.Timezone rule)   {    this_program r=clone();    if (rule->is_timezone) r->timezone=rule;    if (rule->is_language) r->language=rule;    return r;   }      //!   this_program clone()   {