is_datetime
The is_datetime function determines if a string value is an ISO 8601 time value like '2005-09-28T04:35:14.45' or 2005-09-28T04:35:14.45. Strings with enclosing ' ' are present in FITS image headers and are returned using CImage:KwdGetRaw.
bResult = is_datetime( sString ) |
sString is
the string to test.
bResult =
true if the string is
an ISO 8601 time value.
bResult =
false if not.
The script below evaluates a string to test whether is is in ISO 8601 format:
|
-- ISO 8601 string with ' ' |
|
|
|
-- prints result = true |
|
|
|
-- ISO 8601 string without ' ' |
|
|
|
-- prints result = true |
|
|
|
-- string, but not time |
|
|
|
-- prints result = false |
|
|
|
-- not a string |
|
|
|
-- prints result = false |
Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.