The date and time utilities are:
%D: Displays the current date using the [d]d-mmm-[yy]yy format.
%DATE: Converts input date to the $HOROLOG format.
%H: Converts date and time to and from $HOROLOG format.
%T: Displays the current time in [h]h:mm AM/PM format.
%TI: Converts time to $HOROLOG format.
%TO: Converts the current time from $HOROLOG format to [h]h:mm AM/PM format.
The "%" sign has been removed from the topic headings below, intentionally.
The Intrinsic Special Variable $ZDATEFORM interprets year inputs with two digits as described in the following table:
$ZDATEFORM |
INTERPRETATION OF 2 DIGIT YEAR |
OUTPUT OF %D |
0: |
20th century (1900 - 1999) |
2 digits |
1: |
current century (2000 - 2099) |
4 digits |
(1841-9999): |
the next 99 years starting from $ZDATEFORM (x - x+99) |
4 digits |
other: |
current century (2000 - 2099) |
4 digits |
Example:
If $ZDATEFORM is 1965, an input year of 70 would be interpreted as 1970, whereas an input year of 10 would be taken as 2010.