Skip to content

Commit

Permalink
Update chrono and replace Duration with TimeDelta
Browse files Browse the repository at this point in the history
Updated chrono to v0.4.34 and renamed Duration to TimeDelta (renamed in the newest version of chrono)
  • Loading branch information
TypicalHog committed Feb 20, 2024
1 parent f3b8feb commit 8eeee81
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "randevu"
version = "1.0.1"
version = "1.0.2"
authors = ["TypicalHog"]
edition = "2021"
description = "The official Rust implementation of the RANDEVU algorithm"
readme = "README.md"
repository = "https://github.com/TypicalHog/randevu"
license = "Unlicense OR MIT OR Apache-2.0"
keywords = ["randevu", "rdv", "blake3", "reminder", "universal"]
keywords = ["randevu", "rdv", "global", "reminder", "blake3"]
categories = ["algorithms", "date-and-time"]

[dependencies]
blake3 = "1.5.0"
chrono = "0.4.33"
chrono = "0.4.34"
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
//! ```
use blake3;
use chrono::{Duration, Utc};
use chrono::{TimeDelta, Utc};

/// Returns current UTC DATE `String` in ISO 8601 format (YYYY-MM-DD), with an OFFSET `i64` in days
pub fn utc_date_with_offset(offset: i64) -> String {
(Utc::now() + Duration::days(offset))
(Utc::now() + TimeDelta::days(offset))
.format("%Y-%m-%d")
.to_string()
}
Expand Down

0 comments on commit 8eeee81

Please sign in to comment.