NAG FL Interface
x05abf (date_​array_​string)

1 Purpose

x05abf converts from a seven-integer format time and date, as returned by x05aaf, into a character string, returned via the function name.

2 Specification

Fortran Interface
Function x05abf ( itime)
Character(30) :: x05abf
Integer, Intent (In) :: itime(7)
C Header Interface
#include <nag.h>
char *  x05abf_ (const Integer itime[])
The routine may be called by the names x05abf or nagf_time_date_array_string.

3 Description

x05abf returns a character string of length 30 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
If on entry the date in itime is invalid, the string returned is '** Illegal date/time **'

4 References

None.

5 Arguments

1: itime7 Integer array Input
On entry: a date and time in the format returned by x05aaf.
itime1
Must contain the year as a positive integer.
itime2
Must contain the month, in the range 1–12.
itime3
Must contain the day, in the range 1 to p, where p=28, 29, 30 or 31, depending on the month and year.
itime4
Must contain the hour, in the range 0–23.
itime5
Must contain the minute, in the range 0–59.
itime6
Must contain the second, in the range 0–59.
itime7
Must contain the millisecond, in the range 0–999.

6 Error Indicators and Warnings

None.

7 Accuracy

The day name included as part of the character string returned by this routine 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 routine with a date earlier than these will therefore not return a day name that is historically accurate.

8 Parallelism and Performance

x05abf is not threaded in any implementation.

9 Further Comments

Two dates stored in character string format, as returned by this routine, may be compared by x05acf.

10 Example

This example initializes a time in itime, and converts it to character format by a call to x05abf.

10.1 Program Text

Program Text (x05abfe.f90)

10.2 Program Data

Program Data (x05abfe.d)

10.3 Program Results

Program Results (x05abfe.r)