Time utilities (#34)

Converting from seconds-since-1970
dhms (time) => string ...DD:HH:MM:SS
english_time (time[, reference time)=> string of y, m, d, m, s

Converting to seconds
to_seconds ("hh:mm:ss") => seconds since 00:00:00
from_ctime (ctime) => corresponding time-since-1970
from_day (day_of_week, which) => time-since-1970 for the given day*
from_month (month, which) => time-since-1970 for the given month*
(* the first midnight of that day/month)
parse_english_time_interval("n1 u1 n2 u2...")
=> seconds in interval
seconds_until_time("hh:mm:ss") => number of seconds from now until then
seconds_until_date("month",day,"hh:mm:ss",flag
=> number of seconds from now until then
(see verb help for details)

Converting to some standard English formats
day ([c]time) => what day it is
month ([c]time) => what month it is
ampm ([c]time[, precision]) => what time it is, with am or pm
mmddyy ([c]time) => date in format MM/DD/YY
ddmmyy ([c]time) => date in format DD/MM/YY

Substitution
time_sub (string, time) => substitute time information

Miscellaneous
sun ([time]) => angle between sun and zenith
dst_midnight (time)


You are not logged in.

[home | help | who | search | setup | code]