Time module
This module contains functions to store date/time data, and to format dates and times in ways suitable for interaction with other systems such as email, HTTP or databases.
Data types
- Time::Day - Days of the week.
- Time::IsoTimeOpts - Flags for the isoTime function
- Time::Month - Months of the year.
- Time::Time - Representation of time.
Exceptions
- CantParseTime - Can't parse string to time
- NoSuchDay - Invalid day name
- NoSuchMonthName - Invalid month name
- NoSuchMonthNumber - Invalid month number
Functions
- Time addDays(Time t,Int days) - Add some days to a date.
- String cookieTime(Time t) - Return a HTTP Cookie expiry time
- Day day(String s) - Convert a String to a Day
- Time gmTime(Int secs=now()) - Convert a time to GMT.
- Int int(Month m) - Convert a Month to an Int
- String isoTime(Time t,[IsoTimeOpts] opts=[],Int tzOffs=0) - Convert a Time-value into ISO-8601 format
- String isoTime(Int secs,[IsoTimeOpts] opts=[]) - Convert a Unix timestamp into ISO-8601 format
- Time localTime(Int secs=now()) - Convert a time to local time.
- Int microTime() - Get microsecond time
- Int mkTime(Time t) - Convert a Time to seconds.
- Month month(Int m) - Convert an Int to a Month
- Month month(String s) - Convert a String to a Month
- Int now() - Get the current time.
- Time parseISO8601(String t) - Convert an ISO 8601 time string to a Time
- Time parseRFC2822(String t) - Convert an RFC 2822 string to a Time
- String rfc2822Time(Time t,String tz="+0000") - Return an RFC 2822 time
- String string(Day d) - Convert a Day to a string
- String string(Month m) - Convert a Month to a string