Expand description
fasttime — small UTC date/time library built around Ben Joffe’s fast 64-bit days→date algorithm.
Features:
no_stdcompatible (onlycore;stdis optional).Date/Time/DateTime(UTC).Durationwith nanosecond precision.UtcOffsetandOffsetDateTime(fixed offset, RFC 3339-style).- ISO-like formatting via
Display. - Parsing of:
Date: “YYYY-MM-DD”Time: “HH:MM:SS[.fffffffff]”DateTime(UTC): “YYYY-MM-DDTHH:MM:SS[.fffffffff]Z”OffsetDateTime: “YYYY-MM-DDTHH:MM:SS[.fffffffff][Z|±HH:MM]” (RFC 3339 subset).
DateTime::now_utc()when thestdfeature is enabled.
§Python Bindings
When built with the python feature, this crate provides Python bindings via PyO3.
See the python/ directory for examples and documentation.
Structs§
- Date
- Gregorian calendar date (proleptic).
- Date
Time - Combined UTC date and time (no time zone).
- Duration
- Signed duration with nanosecond precision.
- Offset
Date Time - Date-time with a fixed offset from UTC (RFC 3339-style).
- Time
- Time of day in nanoseconds since midnight.
- UtcOffset
- Fixed offset from UTC, in seconds (e.g. +02:00).
Enums§
- Date
Error - Errors constructing or parsing a
Date. - Rfc3339
Offset Error - Errors parsing an RFC 3339 UTC offset.
- Time
Error - Errors constructing or parsing a
Time. - UtcOffset
Error - Error constructing a UTC offset.
- Weekday
- Calendar weekday (ISO order, Monday = 1).