Date
A Gregorian date and time (UTC).
Where DD is the day of the month (1..31), MMM is a 3-letter month name, YYYY is a year like 1998, HH is the hour of the day, MM is the number of minutes into the hour, SS is the number of seconds into the minute, and ss is a fraction of a second. Trailing time components can be omitted, and the : colon separating the year component from the hour component can be replaced with a space.
D + T
D - T
Where D
is a date and time in the form of a
Date
expression and T
is a time interval
in the form of a Interval
expression.
if($date >= 25-DEC-1998 12:00 && $date <= 25-DEC-1998 2:00) { print "Its time for Christmas dinner!\n" } print $today Date day = $today foreach(Interval t) {0h, 6h, 12h, 18h, 24h} { until $date > $day + $t print "Another quarter of a day has passed.\n" } print "The day has passed.\n"
Date
are returned by the
today()
and
tomorrow()
functions.