Pike v8.1 release 6

Method Calendar.YMD.datetime()


Method datetime

mapping(string:int) datetime(int|void unix_time)

Description

Replacement for localtime; gives back a mapping:

 ([ "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
 ]);
This is the same as calling Second()->datetime().