Skip to main content

Module date

Module date 

Source
Expand description

Parse dates.

The wire form is {"__type":"Date","iso":"YYYY-MM-DDTHH:MM:SS.mmmZ"}: ISO 8601, always UTC, always a literal Z, always exactly three fractional digits. Round trips must be lossless.

The same logical value has two wire forms depending on position, and conflating them is a real bug that a published Rust Parse client shipped: top-level createdAt and updatedAt are bare ISO strings, while a user-defined Date field is the __type envelope above. ParseDate models the value; the encoder decides the form from where it sits.

Structsยง

ParseDate
A Parse date. Millisecond precision, UTC.