Skip to main content

Module datetime

Module datetime 

Source
Expand description

First-class DateTime and Duration types.

NdbDateTime stores microseconds since Unix epoch (1970-01-01T00:00:00Z). NdbDuration stores microseconds as a signed i64.

Both serialize as strings (ISO 8601 for DateTime, human-readable for Duration) for JSON compatibility. Internal representation is i64 for efficient comparison and arithmetic.

Structsยง

DateTimeComponents
Components of a civil date-time.
NdbDateTime
Microseconds-precision UTC timestamp.
NdbDuration
Microseconds-precision duration (signed).