Functions | |
leapYear year | |
dayOfYear date | |
new epoch | |
scan timestamp | |
rfc2616 date | |
epoch date | |
Date, time and calendar facilities and constants
tanzer::date::dayOfYear | date | ||
Returns the number of days (starting with 1) into the year of the date object provided in $date
.
tanzer::date::epoch | date | ||
Given the date object in $date
, generate a Unix epoch timestamp.
tanzer::date::leapYear | year | ||
Returns true if $year
is a leap year.
tanzer::date::new | epoch | ||
Given a Unix epoch timestamp in $epoch
, return a new [dict]
containing the following elements:
year
month
day
weekday
A short string representation of the current day of week; one of the following:
hour
minute
second
tanzer::date::rfc2616 | date | ||
Given the date object in $date
, generate an RFC 2616 timestamp string.
tanzer::date::scan | timestamp | ||
Given an RFC 2616 timestamp in $timestamp
, return a new date object as per tanzer::date::new.