1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
#pike __REAL_VERSION__ 
 
//! Contains a time zone. 
class Timezone 
{ 
   constant is_timezone=1; 
 
  // seconds to utc, not counting DST 
  protected int offset_to_utc; 
 
  // timezone name 
  string name; 
 
  //! @param offset 
  //!   Offset to UTC, not counting DST. 
  //! @param name 
  //!   The name of the time zone. 
  protected void create(int offset, string name) 
  { 
    offset_to_utc=offset; 
    this::name=name; 
  } 
 
   // 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}); 
  } 
 
  protected string _sprintf(int t) 
  { 
    return t=='O' && "Timezone("+name+")"; 
  } 
 
  //! 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); 
 
   string gregorian_week_day_name_from_number(int n); 
   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); 
}