1707 Commits

Author SHA1 Message Date
Dirkjan Ochtman
6a853015b7 Upgrade to windows-bindgen 0.61 2025-03-24 10:51:58 +01:00
Dirkjan Ochtman
265c79b2a5 Tweak WeekdaySet method order 2025-03-23 10:21:18 +01:00
Dirkjan Ochtman
57567b3e56 Tweak WeekdaySet docs 2025-03-23 10:21:18 +01:00
Dirkjan Ochtman
97d6c63733 Privatize WeekdaySetIter fields 2025-03-23 10:21:18 +01:00
Dirkjan Ochtman
64c65a9256 Rename WeekdaySet::iter_from() to iter() 2025-03-23 10:21:18 +01:00
Dirkjan Ochtman
4094865116 Remove Not impls for WeekdaySet and Weekday 2025-03-23 10:21:18 +01:00
Dirkjan Ochtman
cac4e8cf8d Move WeekdaySet constructors to the top 2025-03-23 10:21:18 +01:00
Dirkjan Ochtman
cac71f3f4d Rename weekdays module to weekday_set 2025-03-23 10:21:18 +01:00
Ruslan Fadeev
4f4e95bee8 add WeekdaySet - a collection of Weekday 2025-03-23 09:40:30 +01:00
McKayla Washburn
39fb201c08 Add num_days_in_month method to Datelike trait 2025-03-17 16:16:33 +01:00
jimmycathy
7ebf64c2d1 chore: fix some comments
Signed-off-by: jimmycathy <clonecode@outlook.com>
2025-03-16 07:11:06 +01:00
Georges Goetz
fa957cc8dc Implement utility functions for converting TimeDelta to fractional seconds.
Add `as_seconds_f64` and `as_seconds_f32` methods to `TimeDelta` for converting durations to a fractional number of seconds, with single or double precision.
2025-03-01 09:39:52 +01:00
Georges Goetz
cc6801d3dc Group subsec duration methods with their corresponding whole methods.
This makes for more logical grouping of the methods, and opens up a good landing spot for `as_seconds_f32` and `as_seconds`f64` next to `num_seconds`.
2025-03-01 09:39:52 +01:00
Robert Bastian
2115206bc3 Deprecate NaiveDateTime::UNIX_EPOCH 2025-02-27 20:10:13 +01:00
Georges Goetz
042109f4f8 Add subsec_millis and subsec_micros methods for TimeDelta.
Co-authored-by: Micha White <botahamec@outlook.com>
2025-02-27 18:50:14 +01:00
Georges Goetz
f0f807d1b5 Improve documentation for subsec_nanos() and add a test for the method.
Co-authored-by: Micha White <botahamec@outlook.com>
2025-02-27 18:50:14 +01:00
Dirkjan Ochtman
2b7a28ebe9 Bump version to 0.4.40 v0.4.40 2025-02-26 09:32:04 +01:00
Nicolas Boichat
6d29c8abe7 Add quarter (%q) date string specifier
GNU date supports %q as a date string specifier. This adds
support for that in chrono.

This is needed by uutils/coreutils for compability.
2025-02-25 16:18:20 +01:00
Dirkjan Ochtman
07216ae8fd Upgrade to windows-bindgen 0.60 2025-02-24 18:00:00 +01:00
Dirkjan Ochtman
bf1973ccc7 Use similar-asserts to show bindgen diff 2025-02-24 18:00:00 +01:00
Dirkjan Ochtman
d0f8b599b7 Restrict MSRV to check --lib 2025-02-24 18:00:00 +01:00
Dirkjan Ochtman
1f345fd7f9 Switch to 2024 idiom 2025-02-21 11:20:55 +01:00
Dirkjan Ochtman
7f6cf5e504 Switch to 2024 style 2025-02-21 11:20:55 +01:00
Dirkjan Ochtman
11d227a22b Apply suggestions from clippy 1.85 2025-02-21 11:20:55 +01:00
AVee
15e287b4fb
Use NaiveDateTime for internal tz_info methods. (#1658)
This replaces passing a timestamp and year to several internal functions with
passing a NaiveDateTime, making the function signature slightly clearer. The
values originated from in the a NaiveDateTime in first place, so it basically
just postpones the conversion.

Co-authored-by: Arjan <arjan@xldata.nl>
2025-02-18 10:54:53 +01:00
Sam Folorunsho
8317e7ca41 docs: fix minor typo 2025-02-15 18:18:07 +01:00
Maxim Evtush
7cdca4b006 Update LICENSE.txt 2025-01-29 10:38:00 +01:00
Steven Tang
4c42ee5ceb Expose write_to for DelayedFormat
Request for #1649
- renamed format to write-to and made it public.
- added unittests
- added benchmarks to compare and show  `Display` is slower than `write_to` in that
  specific use case.
2025-01-23 17:02:24 +01:00
MagnumT
5f2f5a8332
Feature/round_up method on DurationRound trait (#1651) 2025-01-20 10:21:13 +01:00
Dirkjan Ochtman
82bacb85bd wasm32-wasi was renamed to wasm32-wasip1
cargo-wasi seems unmaintained and does not support the new target.
2025-01-10 10:27:49 +01:00
Dirkjan Ochtman
12a814f860 Add weekly scheduled CI runs 2025-01-10 10:27:49 +01:00
Kenny Kerr
97f758f46d Update Windows dependencies 2025-01-07 20:34:23 +01:00
Dirkjan Ochtman
07a42f9f49 Add Month::num_days() 2025-01-06 14:40:48 +01:00
Dirkjan Ochtman
8b863490d8 Bump version to 0.4.39 v0.4.39 2024-12-09 11:06:20 +01:00
Noisy
33aaebfc35 Update mod.rs 2024-12-05 21:33:54 +01:00
futreall
65c47f377d Update CHANGELOG.md 2024-12-02 11:35:10 +01:00
Dirkjan Ochtman
ca8232ff4e Update licenses for unicode-ident 1.0.14 2024-11-29 14:21:20 +01:00
Dirkjan Ochtman
1456fa0977 Apply suggestions from clippy 1.83 2024-11-29 14:21:20 +01:00
dependabot[bot]
1c7567b34d Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 09:07:04 +01:00
Frank Elsinga
f9ffd6fbde add #[inline] to num_days 2024-11-11 11:00:41 +01:00
Kyle Huey
7974c60649 Fix comment. 2024-10-24 05:26:37 +00:00
Viktor Szépe
77d50b1fc1 Fix typos 2024-10-20 07:46:13 +00:00
Jonas Schäfer
771c0477bf Use Formatter::pad (instead of write_str) for Weekdays
That way, width, alignment and fill from the format string are
respected.

Fixes #1620.
2024-10-14 10:58:21 +00:00
Mirage Lyu
d8a177e4f5 Support ohos tzdata since oh35 2024-10-11 09:06:44 +00:00
DSeeLP
05a6ce68cf Derive PartialEq,Eq,Hash,Copy and Clone on NaiveWeek 2024-10-01 07:59:40 +00:00
Ihor Ranchynskyi
c8defc7766
impl serde::Serialize and serde::Deserialize for TimeDelta (#1599) 2024-09-16 12:10:29 +02:00
Kirill Ivanov
081c6482bc Test that NaiveWeek checked functions don't panic 2024-08-19 12:49:23 +02:00
Kirill Ivanov
f765936ee3 Add checked_days 2024-08-19 12:49:23 +02:00
Kirill Ivanov
ccb04bc449 Add checked_last_day 2024-08-19 12:49:23 +02:00
Kirill Ivanov
68afd5b407 Add checked_first_day 2024-08-19 12:49:23 +02:00