From 1ff7381fa4ab61bc685e723e3fa3134de639b2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?= Date: Mon, 25 Mar 2024 15:41:41 +0700 Subject: [PATCH] Expose DateTime type from chrono (#2) * Expose DateTime type from chrono Some methods on NaiveDateTime are deprecated and replaced with DateTime. * Add changelog entry * Remove timestamp from changelog --- CHANGELOG.md | 5 ++++- Cargo.toml | 2 +- src/lib.rs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3c7012..c5a3fa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] - ReleaseDate +### Added +- Expose `DateTime` type to be used as replacement for some deprecated methods. + ## [0.3.1] - 2024-02-01 ### Added @@ -55,4 +58,4 @@ future. All changes will be documented in this CHANGELOG. [0.3.0]: https://github.com/eldruin/rtcc-rs/compare/v0.2.1...v0.3.0 [0.2.1]: https://github.com/eldruin/rtcc-rs/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/eldruin/rtcc-rs/compare/v0.1.0...v0.2.0 -[0.1.0]: https://github.com/eldruin/rtcc-rs/releases/tag/v0.1.0 \ No newline at end of file +[0.1.0]: https://github.com/eldruin/rtcc-rs/releases/tag/v0.1.0 diff --git a/Cargo.toml b/Cargo.toml index 7645849..31d06d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,4 +21,4 @@ include = [ edition = "2021" [dependencies] -chrono = { version = "0.4.33", default-features = false } +chrono = { version = "0.4.35", default-features = false } diff --git a/src/lib.rs b/src/lib.rs index c9de3f0..f3446a7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ #![deny(unsafe_code, missing_docs)] #![no_std] -pub use chrono::{Datelike, NaiveDate, NaiveDateTime, NaiveTime, Timelike}; +pub use chrono::{DateTime, Datelike, NaiveDate, NaiveDateTime, NaiveTime, Timelike}; /// Hours in either 12-hour (AM/PM) or 24-hour format #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]