3c4ac02003-03-10Martin Nilsson #pike __REAL_VERSION__ //! Contains a time zone. class Timezone { constant is_timezone=1; // seconds to utc, not counting DST
9eaf1d2008-06-28Martin Nilsson  protected int offset_to_utc;
3c4ac02003-03-10Martin Nilsson  // timezone name string name; //! @param offset //! Offset to UTC, not counting DST. //! @param name //! The name of the time zone.
d7db5d2013-05-31Martin Nilsson  protected void create(int offset, string name)
3c4ac02003-03-10Martin Nilsson  { offset_to_utc=offset;
8e06a32014-09-30Martin Nilsson  this::name=name;
3c4ac02003-03-10Martin Nilsson  } // seconds to UTC, counting DST //! @fixme //! This method takes one integer argument, ignores it and //! returns an array with the UTC offset and the timezone name. array tz_ux(int unixtime) { return ({offset_to_utc,name}); } //! @fixme //! This method takes one integer argument, ignores it and //! returns an array with the UTC offset and the timezone name. array tz_jd(int julian_day) { return ({offset_to_utc,name}); }
d7db5d2013-05-31Martin Nilsson  protected string _sprintf(int t) { return t=='O' && "Timezone("+name+")"; }
3c4ac02003-03-10Martin Nilsson  //! Returns the offset to UTC, not counting DST. int raw_utc_offset() { return offset_to_utc; } } 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); string week_day_name_from_number(int n); string week_day_shortname_from_number(int n); int week_day_number_from_name(string name);
39632b2006-01-10Martin Bähr  string gregorian_week_day_name_from_number(int n);
3c4ac02003-03-10Martin Nilsson  string gregorian_week_day_shortname_from_number(int n); int gregorian_week_day_number_from_name(string name); string week_name_from_number(int n); int week_number_from_name(string s); string year_name_from_number(int y); }