Paul Dicker
073c3c32f0
Replace TimeDelta::days
with try_days
2024-03-06 14:04:55 +01:00
Paul Dicker
383fcff56c
Use simplified resolve_week_date
2024-03-06 14:04:55 +01:00
Paul Dicker
d7e5853949
Use checked_add_days
in NaiveDateWeeksIterator
2024-03-06 14:04:55 +01:00
Paul Dicker
5caa640f0f
Documentation fixes
2024-03-06 14:04:55 +01:00
Paul Dicker
90dbd75d0d
Hide fields on Parsed
in preparation of making them private with 0.5
2024-03-06 14:01:32 +01:00
Paul Dicker
ba4e50c8f2
Add getters to Parsed
2024-03-06 14:01:32 +01:00
Paul Dicker
40724008b2
Add range checks to the Parsed::set_*
methods
2024-03-06 14:01:32 +01:00
dependabot[bot]
f4adc28dce
Update windows-bindgen requirement from 0.53 to 0.54
...
Updates the requirements on [windows-bindgen](https://github.com/microsoft/windows-rs ) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases )
- [Commits](https://github.com/microsoft/windows-rs/compare/0.53.0...0.54.0 )
---
updated-dependencies:
- dependency-name: windows-bindgen
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 07:34:48 +01:00
Paul Dicker
0aa46ddbf0
Sync Datelike
docs
2024-03-01 11:52:26 +01:00
Paul Dicker
1d3da21ae2
Add comment to calculate UNIX_EPOCH_DAY
2024-03-01 11:52:09 +01:00
Paul Dicker
83573a8b30
Deprecate timestamp methods on NaiveDateTime
2024-03-01 11:52:09 +01:00
Paul Dicker
585d48be38
Don't use timestamp methods from NaiveDateTime
in serde
module
2024-03-01 11:52:09 +01:00
Paul Dicker
392e0dd460
Don't use timestamp methods from NaiveDateTime
2024-03-01 11:52:09 +01:00
Paul Dicker
39f9a97b9b
Translate timestamp tests to DateTime
2024-03-01 11:52:09 +01:00
Paul Dicker
27a1ee4cdc
Move implementation of from_timestamp*
to DateTime
2024-03-01 11:52:09 +01:00
Paul Dicker
0c23fd4df5
Move implementation of timestamp*
to DateTime
2024-03-01 11:52:09 +01:00
Paul Dicker
1c1feca6fa
Use UNIX_EPOCH
in NaiveDateTime::default()
2024-03-01 11:52:09 +01:00
Paul Dicker
774951ff3d
Add DateTime::{from_timestamp_micros, from_timestamp_nanos}
2024-03-01 11:52:09 +01:00
Paul Dicker
ca51f694bb
Make with_year
return Some
if it is a no-op
2024-02-29 13:16:43 +01:00
Paul Dicker
43675f162c
Use overflowing_naive_local
in checked_(add|sub)_days
2024-02-29 13:16:43 +01:00
Paul Dicker
06bd82cccf
Extend fast path in NaiveDate::add_days
2024-02-29 13:16:43 +01:00
Paul Dicker
dd201649b5
Use overflowing_naive_local
in checked_(add|sub)_months
2024-02-29 13:16:43 +01:00
Paul Dicker
e292d9bc90
Simplify from_isoywd
a bit
2024-02-27 16:04:18 +01:00
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