Interface DateUtil
access this type via: time.DateUtil (provides, requires or uses)
Perform equality checks and conversions between two different DateTime instances.
Constants
int16 MAX_MSEC
byte MAX_SEC
byte MAX_MIN
byte MAX_HOUR
byte MAX_MONTH
Functions
bool before(DateTime first, DateTime second)
bool after(DateTime first, DateTime second)
bool equal(DateTime first, DateTime second)
DateTime diff(DateTime first, DateTime second)
int toMilliseconds(DateTime date)
char[] makeString(DateTime d, optional char format[])
Constants
MAX_MSEC
MAX_SEC
MAX_MIN
MAX_HOUR
MAX_MONTH
bool before(DateTime first, DateTime second)
Returns true if first comes before second.
bool after(DateTime first, DateTime second)
Returns true if first comes after second.
bool equal(DateTime first, DateTime second)
Returns true if first and second are exactly the same time.
DateTime diff(DateTime first, DateTime second)
Returns a DateTime instances that represents the difference between first and second.
int toMilliseconds(DateTime date)
Converts a DateTime instance into milliseconds (commonly used after diff). The result of this function will be inaccurate if the given date/time is too large to fit into an integer.
char[] makeString(DateTime d, optional char format[])
Converts a DateTime instance to a string, following an optional format. Format is specified as any string which contains some or all of the strings YYYY, MM, DD, HH, MN, SS, MIL. For example, the format string YYYY/MM/DD HH:MN:SS.MIL gives all time information with the given separators in between each element.