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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[]
= "time_compute"
= "1.0.0"
= "2021"
= "MIT"
= "Dependency-free date/time computation library, with an API closely mirroring chrono"
= "https://github.com/Fab2bprog/Time-Compute"
= "README.md"
= ["date", "time", "calendar", "chrono"]
= ["date-and-time"]
# Ensures docs.rs builds documentation for the optional features (mirroring
# chrono's own choice here). `rkyv-16`/`rkyv-32`/`rkyv-64` are mutually
# exclusive (see the `rkyv` feature below), so only one (`rkyv`, which maps
# to `rkyv/size_32`) is listed -- listing more than one here would fail the
# docs.rs build the same way `cargo clippy --all-features` does.
[]
= ["serde", "unstable-locales", "arbitrary", "defmt", "rkyv", "rkyv-validation"]
[]
# Optional (de)serialization support, mirroring chrono's own feature set.
# Disabled by default, matching chrono's default feature set (neither is
# in chrono's `default = [...]` list either).
= ["dep:serde"]
# Note that rkyv-16, rkyv-32, and rkyv-64 are mutually exclusive, exactly
# like in chrono.
= ["dep:rkyv", "rkyv/size_32"]
= ["dep:rkyv", "rkyv?/size_16"]
= ["dep:rkyv", "rkyv?/size_32"]
= ["dep:rkyv", "rkyv?/size_64"]
= ["rkyv?/validation"]
# Locale-aware formatting/parsing (month/weekday names in other languages
# than English, locale-specific `%x`/`%X`/`%c`/`%r` formats). Named
# `unstable-locales` for parity with chrono, and for the same reason
# chrono uses that name: the output can shift with a `pure-rust-locales`
# version bump (it corrects locale data over time), so this is not given
# the same stability guarantee as the rest of the crate's API, even
# though our own integration code is new and has seen less real-world use
# than chrono's.
= ["dep:pure-rust-locales"]
# `arbitrary::Arbitrary` support (for fuzzing), matching chrono's own
# optional `arbitrary` feature 1:1 (explicitly authorized by Fabrice,
# 2026-07-13, same rationale as serde/rkyv/pure-rust-locales).
= ["dep:arbitrary"]
# `defmt::Format` support (compact `Debug`-like output for embedded/
# no_std targets), matching chrono's own optional `defmt` feature 1:1
# (explicitly authorized by Fabrice, 2026-07-13, same rationale as
# serde/rkyv/pure-rust-locales). Also turns on `pure-rust-locales`'s own
# `defmt` feature (needed for `Locale: defmt::Format` when `defmt` and
# `unstable-locales` are both enabled), exactly like chrono does.
= ["dep:defmt", "pure-rust-locales?/defmt"]
[]
# The core of this crate (calendar math, durations, naive date/time types,
# `Utc`, `FixedOffset`) has no dependency. Six exceptions are allowed:
# - `tzdb`/`tz-rs`: read the IANA time zone database and detect the
# system's local time zone, for the `Local` time zone type.
# - `serde`/`rkyv`: optional (de)serialization support, matching chrono's
# own optional `serde`/`rkyv` features 1:1 (explicitly authorized by
# Fabrice as an exception to the zero-dependency mandate, 2026-07-13).
# - `pure-rust-locales`: locale data (month/weekday names, date/time
# formats) for the optional `unstable-locales` feature (explicitly
# authorized by Fabrice, 2026-07-13, same rationale as serde/rkyv).
# - `arbitrary`/`defmt`: optional fuzzing / embedded-logging support,
# matching chrono's own optional `arbitrary`/`defmt` features 1:1
# (explicitly authorized by Fabrice, 2026-07-13, same rationale as
# serde/rkyv/pure-rust-locales).
# - `astro`: real astronomical computation (Meeus' algorithms / VSOP87),
# used only for the Japanese solar-term functions
# (`shunbun_no_hi`/`shuubun_no_hi`/`setsubun` in `naive/date.rs`).
# Unlike every exception above, this is the crate's first delegation of
# actual *computation* (not static data) to an external library, and
# those three functions are the only non-`const fn`, floating-point
# functions in the whole crate. A deliberate exception explicitly
# requested by Fabrice, overriding this project's own recommendation to
# stay dependency-free (2026-07-13).
= "0.7"
= "0.7"
= { = "1", = false, = true }
= { = "0.7", = false, = true }
= { = "0.8", = true }
= { = "1", = ["derive"], = true }
= { = "1", = true }
= "2.0.0"
[]
# Dev-only: never shipped to consumers of the published crate, so this is
# not an exception to the zero-dependency mandate for the library itself.
# Used exclusively by this crate's own `#[cfg(test)] mod tests` blocks,
# gated behind the `serde` feature, to check that a value survives a JSON
# round trip; `time_compute` itself never depends on `serde_json`.
= "1"
# The crate's own optional `serde` dependency above is declared with
# `default-features = false`, so it does not pull in the `derive` feature
# (the `#[derive(Serialize)]`/`#[derive(Deserialize)]` macros) -- the
# crate's public API never needs them, since every `serde` impl on a
# public type is written by hand (a plain string/timestamp encoding), not
# derived. Two permanent unit tests (`ts_seconds_serde_helper_round_trips*`
# in `src/datetime.rs` and `src/naive/datetime.rs`) do derive
# `Serialize`/`Deserialize` on a small test-only `Wrapper` struct, purely
# to exercise the public `ts_seconds` helper module end-to-end -- so the
# `derive` feature is enabled here, in `[dev-dependencies]` only. Thanks to
# Cargo's feature resolver (edition 2021), this feature addition applies
# only when testing this crate itself, never when it is used as a
# dependency by another project.
= { = "1", = ["derive"] }