1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! # 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](https://tc39.es/proposal-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
//!
//! ```no_run
//! 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 | — |
/// Pure-Rust calendar arithmetic (internal implementation detail).
///
/// Based on Howard Hinnant's public-domain date algorithms.
/// Not part of the public API; subject to change without notice.
/// Error and `Result` types returned by fallible operations.
/// Datetime formatting — strftime (`%Y-%m-%d`) and Luxon (`yyyy-MM-dd`) tokens.
/// Zero-allocation ISO 8601 / RFC 3339 parser.
/// IANA timezone resolution backed by the embedded `jiff` timezone database.
/// Core datetime types: `ZonedDateTime`, `PlainDate`, `PlainTime`,
/// `PlainDateTime`, and `Duration`.
/// Optional `wasm-bindgen` JS/WASM bindings (enabled with `--features wasm`).
// ─── Top-level re-exports ─────────────────────────────────────────────────────
pub use ;
pub use ;
pub use TzName;