Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Calendar
Calendar.Time
Calendar.Time.TimeofDay

Method Calendar.Time.TimeofDay()->fraction_no()


Method fraction_no

int hour_no()
int minute_no()
int second_no()
float fraction_no()

Description

This gives back the number of the time unit, on this day. Fraction is a float number, 0<=fraction<1. function mapping datetime() This gives back a mapping with the relevant time information (representing the start of the period);

     ([ "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)
 
        "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
 
        "unix":     int        // unix time
        "julian":   float      // julian day
     ]);