Expand description
§fastemporal
Luxon + Temporal, but in pure Rust — 100× faster, zero GC, passes every test.
fastemporal is a high-level, Luxon-style datetime library for Rust with
full Temporal types (PlainDate,
ZonedDateTime, Duration, …), embedded IANA timezone data, zero
mandatory runtime dependencies, and zero allocations in hot arithmetic
paths. Only ZonedDateTime::to_iso and ZonedDateTime::format
allocate — they return an owned String.
§Quick start
use fastemporal::{ZonedDateTime, Duration};
let dt = ZonedDateTime::now()
.plus(Duration::days(7))
.in_timezone("America/New_York").unwrap();
println!("{}", dt.to_iso());
// e.g. 2025-06-07T14:32:00.000-04:00[America/New_York]§Types at a glance
| Type | Description |
|---|---|
ZonedDateTime | Timestamp + IANA timezone; the primary workhorse |
PlainDate | Calendar date with no time or timezone (2025-06-07) |
PlainTime | Wall-clock time with no date or timezone (14:32:05) |
PlainDateTime | Date + time, no timezone (2025-06-07T14:32:05) |
Duration | Calendar/clock span (years, months, days, hours, …) |
TzName | Stack-allocated, Copy-able IANA timezone name |
Unit | Time unit accepted by start_of, end_of, diff |
Error | All errors returned by fallible operations |
§Feature flags
| Feature | Description | Default |
|---|---|---|
tz-embedded | Bundle IANA timezone data in the binary | ✓ |
tz-system | Use the OS /usr/share/zoneinfo at runtime | — |
wasm | wasm-bindgen JS/WASM bindings | — |
serde | Serialize/Deserialize for all types | — |
Re-exports§
pub use error::Error;pub use error::Result;pub use types::Duration;pub use types::PlainDate;pub use types::PlainDateTime;pub use types::PlainTime;pub use types::TimeUnit;pub use types::Unit;pub use types::ZonedDateTime;pub use tz::TzName;
Modules§
- error
- Error and
Resulttypes returned by fallible operations. Error types forfastemporal. - format
- Datetime formatting — strftime (
%Y-%m-%d) and Luxon (yyyy-MM-dd) tokens. Datetime formatting — strftime and Luxon-style tokens. - parsing
- Zero-allocation ISO 8601 / RFC 3339 parser. ISO 8601 / RFC 3339 parsing.
- types
- Core datetime types:
ZonedDateTime,PlainDate,PlainTime,PlainDateTime, andDuration. Core datetime types. - tz
- IANA timezone resolution backed by the embedded
jifftimezone database. IANA timezone resolution.