nag_time_date_array_string (x05ab) converts from a seven-integer format time and date, as returned by
nag_time_date_array (x05aa), into a character string, returned via the function name.
nag_time_date_array_string (x05ab) returns a character string of length
which contains the date and time as supplied in argument
itime. On exit, the character string has the following format:
'DAY XXTH MTH YEAR HR:MN:SC.MIL'
where
-
DAY |
is one of ‘Sun’, ‘Mon’, ‘Tue’, ‘Wed’, ‘Thu’, ‘Fri’, ‘Sat’, |
XX |
is an integer denoting the day of the month, |
TH |
is one of ‘st’, ‘nd’, ‘rd’, ‘th’, |
MTH |
is one of ‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’, ‘Jun’, ‘Jul’, ‘Aug’, ‘Sep’, ‘Oct’, ‘Nov’, ‘Dec’, |
YEAR |
is the year as a four digit integer, |
HR |
is the hour, |
MN |
is the minute, |
SC |
is the second, |
MIL |
is the millisecond. |
If on entry the date in
itime is invalid, the string returned is
'** Illegal date/time **'
None.
None.
None.
The day name included as part of the character string returned by this function is calculated assuming that the date is part of the Gregorian calendar. This calendar has been in operation in Europe since 15 October 1582, and in Great Britain since 14 September 1752. Entry to this function with a date earlier than these will therefore not return a day name that is historically accurate.
Two dates stored in character string format, as returned by this function, may be compared by
nag_time_date_string_compare (x05ac).
This example initializes a time in
itime, and converts it to character format by a call to
nag_time_date_array_string (x05ab).