pike.git
/
lib
/
modules
/
Calendar.pmod
/
YMD.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Calendar.pmod/YMD.pike:145:
//! method string week_name() //! method string year_name() //! method string tzname() //! method string tzname_iso() int julian_day() { return jd; }
-
//!
function
method int unix_time()
+
//! method int unix_time()
//! Returns the unix time integer corresponding to the start //! of the time range object. (An unix time integer is UTC.) int unix_time() { // 1970-01-01 is julian day 2440588 int ux=(jd-2440588)*86400; if (utco==CALUNKNOWN) [utco,tzn]=rules->timezone->tz_jd(jd); return ux+utco;
pike.git/lib/modules/Calendar.pmod/YMD.pike:270:
return rules->language[f_week_day_shortname_from_number](wd); } int leap_year() { return year_leap_year(year_no()); } int hour_no() { return 0; } int minute_no() { return 0; } int second_no() { return 0; } float fraction_no() { return 0.0; }
-
//!
function
method datetime()
+
//! method
mapping
datetime()
//! This gives back a mapping with the relevant //! time information (representing the start of the period); //! <pre> //! ([ "year": int // year number (2000 AD=2000, 1 BC==0) //! "month": int(1..) // month of year //! "day": int(1..) // day of month //! "yearday": int(0..) // day of year //! "week": int(1..) // week of year //! "week_day": int(0..) // day of week //! "timezone": int // offset to utc, including dst
pike.git/lib/modules/Calendar.pmod/YMD.pike:3201:
(t=parse(rfc850_date, what, cx)) || (t=parse(asctime_date+" %z", what+" GMT", cx)) ) return t; return 0; } //-- auxillary functions------------------------------------------------ //!
-
//! function datetime(int|void unix_time)
+
//! function
mapping(string:int)
datetime(int|void unix_time)
//! Replacement for localtime; gives back a mapping: //! <pre> //! ([ "year": int // year number (2000 AD=2000, 1 BC==0) //! "month": int(1..) // month of year //! "day": int(1..) // day of month //! "yearday": int(1..) // day of year //! "week": int(1..) // week of year //! "week_day": int(1..) // day of week (depending on calendar) //! "unix": int // unix time //! "julian": float // julian day //! "hour": int(0..) // hour of day, including dst //! "minute": int(0..59) // minute of hour //! "second": int(0..59) // second of minute //! "fraction": float // fraction of second //! "timezone": int // offset to utc, including dst //! ]); //! </pre> //! This is the same as calling <ref>Second</ref>()-><ref to=Second.datetime>datetime</ref>(). //!
-
//! function datetime_name(int|void unix_time)
-
//! function datetime_short_name(int|void unix_time)
+
//! function
string
datetime_name(int|void unix_time)
+
//! function
string
datetime_short_name(int|void unix_time)
//! Compat functions; same as <ref>format_iso</ref> //! and <ref>format_iso_short</ref>. //! //! function string format_iso(void|int unix_time) //! function string format_iso_short(void|int unix_time) //! function string format_iso_tod(void|int unix_time) //! function string format_day_iso(void|int unix_time) //! function string format_day_iso_short(void|int unix_time) //! Format the object into nice strings; //! <pre>