Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
esheppa committed Apr 30, 2024
1 parent 3ae88cf commit 0a944f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/minutes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ mod tests {
use crate::SubDateResolution;

let dt = chrono::NaiveDate::from_ymd_opt(2021, 12, 6).unwrap();
let tm = dt.and_hms_opt(0, 0, 0).unwrap();
let tm = dt.and_time(NaiveTime::MIN).and_utc();

let min = Minutes::<1>::from(tm);
assert!(min.occurs_on_date() == dt);
Expand Down
2 changes: 1 addition & 1 deletion src/week.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl<D: StartDay> TryFrom<Week_> for Week<D> {
type Error = String;
fn try_from(value: Week_) -> Result<Self, Self::Error> {
if value.start_day == D::NAME {
Ok(Week::new(value.n))
Ok(Week::from_monotonic(value.n))
} else {
Err(format!(
"To create a Week<{}>, the start_day field should be {} but was instead {}",
Expand Down

0 comments on commit 0a944f6

Please sign in to comment.