AtDateTime Module
Functions for creating, validating, and extracting data from AtDateTime values.
Functions and values
| Function or value |
Description
|
Full Usage:
parse s
Parameters:
string
-
A datetime string in the format YYYY-MM-DDTHH:MM:SS[.fractional](Z|+HH:MM|-HH:MM).
Must use uppercase T separator and uppercase Z for UTC.
Seconds are required. The offset -00:00 is not allowed.
Returns: Result<AtDateTime, string>
Ok with a validated AtDateTime, or Error with a message describing the validation failure.
Validation failures include: null input, invalid format, or use of the prohibited -00:00 offset.
|
Parse and validate an AT Protocol datetime string.
|
Full Usage:
value arg1
Parameters:
AtDateTime
Returns: string
The datetime string in RFC 3339 format (e.g. "2023-11-23T12:34:56.789Z").
|
Extract the string representation of an AT Protocol datetime.
|