Paul Dicker
a6c0c6425c
Check for invalid cast
2024-02-27 15:37:31 +01:00
Paul Dicker
bbdc332958
Simplify SerdeError
2024-02-27 15:37:31 +01:00
Paul Dicker
0b68d19a3e
Move serde_from
and SerdeError
to crate::serde
inline module
2024-02-27 15:37:31 +01:00
Paul Dicker
85c70ffad9
Improve documentation of Parset::to_*
2024-02-27 15:32:37 +01:00
Paul Dicker
48f05499d6
Return correct error in Parsed::to_fixed_offset
2024-02-27 15:32:37 +01:00
Paul Dicker
e9e9adf622
Improve documentation of Parsed::set_*
2024-02-27 15:32:37 +01:00
Paul Dicker
a8908b4428
Expand Parsed
documentation
2024-02-27 15:32:37 +01:00
Paul Dicker
9efa85d9b6
Return IMPOSSIBLE
if year fields don't match
2024-02-27 15:32:37 +01:00
Paul Dicker
b882f58fa4
Simplify error value of parse_internal
2024-02-26 11:15:33 +01:00
Paul Dicker
8fcad1fda9
Update windows-bindgen to 0.53
2024-02-26 10:36:48 +01:00
Ed Morley
81d58e05f7
Improve docs for crate features
...
The `chrono` crate makes use of several Cargo features:
02c68d69a1/Cargo.toml (L19-L46)
These features are documented in both `README.md` and the rustdocs
in `lib.rs, however, the lists in each place were missing some features
and also inconsistent in their descriptions.
I've also removed the unused `[wasm-bindgen]` link definition.
Fixes #1434 .
2024-02-26 08:43:05 +01:00
Paul Dicker
02c68d69a1
Rename isoywd_opt
to from_isoywd
(in tests)
2024-02-21 15:30:37 +01:00
Paul Dicker
5d8d440949
Rename yo_opt
to from_yo
(in tests)
2024-02-21 15:30:37 +01:00
Paul Dicker
ef4dc2b06b
Rename ymd_opt
to from_ymd
(in tests)
2024-02-21 15:30:37 +01:00
Paul Dicker
2464a5d6e6
Add newlines between tests in time_delta
module
2024-02-21 14:51:02 +01:00
Paul Dicker
188cf508b2
Remove trailing newlines in method documentation
2024-02-21 14:51:02 +01:00
Paul Dicker
10bc27575b
Format inline comments
2024-02-21 14:51:02 +01:00
Paul Dicker
45f8cecabc
Rustfmt doctests
2024-02-21 14:51:02 +01:00
Paul Dicker
60f8b742c9
CI: only run cargo hack check
on Linux
2024-02-14 15:05:36 +01:00
Paul Dicker
e2e0dfe315
Run clippy also against Windows target
2024-02-14 14:24:04 +01:00
Paul Dicker
c8ff2c37a4
Fix clippy warning
2024-02-14 14:24:04 +01:00
Paul Dicker
042fd0c286
Use TimeDelta
instead of Duration
alias
2024-02-14 14:24:04 +01:00
Paul Dicker
21343bec7e
Extend YearFlags
documentation/constants
2024-02-14 10:59:06 +01:00
Paul Dicker
367fe84be6
MAX_OL
and MAX_MDL
can be private
2024-02-14 10:59:06 +01:00
Paul Dicker
83ad6207b2
Simplify test-only Mdf::valid
method
2024-02-14 10:59:06 +01:00
Paul Dicker
e3ff4bc1d2
Casting a positive i8
through u8
is slightly faster
2024-02-14 10:59:06 +01:00
Paul Dicker
6eec070603
Comparing against zero is slightly faster
2024-02-14 10:59:06 +01:00
Paul Dicker
2703ca2d20
Use NonZeroI32::new_unchecked
2024-02-14 10:59:06 +01:00
Paul Dicker
8cc41ddf02
Don't use NaiveDate::from_ordinal_and_flags
in from_mdf
...
It introduced a couple of extra checks in performance-sensitive code.
2024-02-14 10:59:06 +01:00
Paul Dicker
6d8ce13a71
Mdf::new
: remove checks that are also done by the table lookup
2024-02-14 10:59:06 +01:00
Paul Dicker
7db1dc6d84
Add doc comments to Mdf
methods
2024-02-14 10:59:06 +01:00
Paul Dicker
97403fdc30
Add benchmark for NaiveDate::from_ymd
2024-02-14 10:59:06 +01:00
Paul Dicker
4d4ff14bb9
CI: test cross-compiling to x86_64-unknown-illumos
instead of Solaris
2024-02-13 22:44:14 +01:00
Paul Dicker
0b4d5ffe8a
Use NonZeroI32
inside NaiveDate
2024-02-12 17:05:32 +01:00
Paul Dicker
22a0d40011
Add test for the size of chrono's main data types
2024-02-12 17:05:32 +01:00
Paul Dicker
d9d6b6352e
Move Days
to naive
module
2024-02-12 16:30:37 +01:00
Paul Dicker
41be21eeac
Move NaiveWeek
to naive
module
2024-02-12 16:30:37 +01:00
Paul Dicker
352392ba13
Add NaiveWeek::new
2024-02-12 16:30:37 +01:00
Paul Dicker
792dbd0e0b
Split out test
module to its own file
2024-02-12 16:30:37 +01:00
Paul Dicker
dd88b4b26a
Move naive/date.rs
to naive/date/mod.rs
2024-02-12 16:30:37 +01:00
Paul Dicker
3016c30014
Move cycle_to_yo
and yo_to_cycle
to naive::date
module
2024-02-12 13:58:58 +01:00
Paul Dicker
6894b6fc39
Add Mdf::ordinal
and Mdf::year_flags
; remove Of
type
2024-02-12 13:58:58 +01:00
Paul Dicker
f95a973c4b
Change Mdf::from_of
to Mdf::from_ol
2024-02-12 13:58:58 +01:00
Paul Dicker
4bb5f6124c
Format IsoWeek
comments
2024-02-12 13:58:58 +01:00
Paul Dicker
7c4b119161
Remove Of::flags
, add NaiveDate::year_flags
2024-02-12 13:23:39 +01:00
Paul Dicker
7e5357736f
Remove Of::new
and basic functionality test for Of
2024-02-12 13:23:39 +01:00
Paul Dicker
3dbea44f84
Remove Of::weekday
2024-02-12 13:23:39 +01:00
Paul Dicker
583812d700
Change IsoWeek::from_yof
to consuming ordinal
and year_flags
...
remove `Of::isoweekdate_raw`
2024-02-12 13:23:39 +01:00
Paul Dicker
92b576b219
Move iso_week_from_yof
to IsoWeek::from_yof
2024-02-12 13:23:39 +01:00
Paul Dicker
5a8b1e42b8
Mark format::Numeric
and format::Fixed
as non_exhaustive
2024-02-12 11:58:51 +01:00