X05ABF (PDF version)
X05 Chapter Contents
X05 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

X05ABF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

 Contents

    1  Purpose
    7  Accuracy

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

FUNCTION X05ABF ( ITIME)
CHARACTER(30) X05ABF
INTEGER  ITIME(7)

3  Description

X05ABF returns a character string of length 30 which contains the date and time as supplied in parameter 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  Parameters

1:     ITIME7 – INTEGER arrayInput
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

Not applicable.

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)


X05ABF (PDF version)
X05 Chapter Contents
X05 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015