hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_time_date_array_string (x05ab)

Purpose

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.

Syntax

[result] = x05ab(itime)
[result] = nag_time_date_array_string(itime)

Description

nag_time_date_array_string (x05ab) returns a character string of length 3030 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 **'

References

None.

Parameters

Compulsory Input Parameters

1:     itime(77) – int64int32nag_int array
A date and time in the format returned by nag_time_date_array (x05aa).
itime(1)itime1
Must contain the year as a positive integer.
itime(2)itime2
Must contain the month, in the range 11–12.
itime(3)itime3
Must contain the day, in the range 11 to pp, where p = 28p=28, 2929, 3030 or 3131, depending on the month and year.
itime(4)itime4
Must contain the hour, in the range 00–23.
itime(5)itime5
Must contain the minute, in the range 00–59.
itime(6)itime6
Must contain the second, in the range 00–59.
itime(7)itime7
Must contain the millisecond, in the range 00–999.

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     result –
The result of the function.

Error Indicators and Warnings

None.

Accuracy

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.

Further Comments

Two dates stored in character string format, as returned by this function, may be compared by nag_time_date_string_compare (x05ac).

Example

function nag_time_date_array_string_example
itime = [int64(1789);7;14;13;11;48;320];
[result] = nag_time_date_array_string(itime)
 

result =

Tue 14th Jul 1789 13:11:48.320


function x05ab_example
itime = [int64(1789);7;14;13;11;48;320];
[result] = x05ab(itime)
 

result =

Tue 14th Jul 1789 13:11:48.320



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013