Function isoToUnixSec( isoDate )
- Description:
-
Converts an ISO8601 date string to seconds since 1970-01-01.
The basic format of the
isoDate
argument is
yyyy-mm-ddThh:mm:ss.s
, though some deviations
from this form are permitted:
- The '
T
' which separates date from time
can be replaced by a space
- The seconds, minutes and/or hours can be omitted
- The decimal part of the seconds can be any length,
and is optional
- A '
Z
' (which indicates UTC) may be appended
to the time
Some legal examples are therefore:
"1994-12-21T14:18:23.2
",
"1968-01-14
", and
"2112-05-25 16:45Z
".
- Parameters:
-
- isoDate (String)
- date in ISO 8601 format
- Return Value (floating point):
- seconds since the Unix epoch
- Examples:
isoToUnixSec("2004-10-25T18:00:00") = 1098727200
isoToMjd("1970-01-01") = 0
- Signature:
- double isoToUnixSec(String)