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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Ruleset.pike:1: - //! This is the container class for rules. + //! module Calendar + //! subclass Ruleset + //! This is the container class for rules.         #pike __REAL_VERSION__      class Timezone   {    constant is_timezone=1;      // seconds to utc, not counting DST    static int offset_to_utc;
pike.git/lib/modules/Calendar.pmod/Ruleset.pike:27:    }       array(int) tz_jd(int julian_day)    {    return ({offset_to_utc,name});    }       string _sprintf(int t) { return (t=='O')?"Timezone("+name+")":0; }       int raw_utc_offset() { return offset_to_utc; } - } + };      Timezone timezone;      class Language   {    constant is_language=1;       string month_name_from_number(int n);    string month_shortname_from_number(int n);    int month_number_from_name(string name);
pike.git/lib/modules/Calendar.pmod/Ruleset.pike:108:    {    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;    return r;   }    - //! Sets the guess-mapping for timezones. - //! Default is the mapping + //! method Ruleset set_abbr2zone(mapping(string:string) abbr2zone) + //! Sets the guess-mapping for timezones. + //! Default is the mapping   //! - //! @pre{ + //! <pre>   //! Abbreviation Interpretation   //! AMT America/Manaus [UTC-4]   //! AST America/Curacao [UTC-4]   //! CDT America/Costa_Rica [UTC-5]   //! CST America/El Salvador [UTC-6]   //! EST America/Panama [UTC-5]   //! GST Asia/Dubai [UTC+4]   //! IST Asia/Jerusalem [UTC+2]   //! WST Australia/Perth [UTC+8] - //! @} + //! </pre>   //! - //! @seealso - //! @[YMD.parse()] + //! see also: YMD.parse +  +    this_program set_abbr2zone(mapping(string:string) m)   {    this_program r=clone();    r->abbr2zone=m;    return r;   }      this_program set_rule(Language|Timezone rule)   {    this_program r=clone();