diff --git a/src/time/mod.rs b/src/time/mod.rs index fdcf30e..c32c045 100644 --- a/src/time/mod.rs +++ b/src/time/mod.rs @@ -172,10 +172,12 @@ impl From for DateTime { } } let mut month = 1; - let m_days = u64::from(days_in_month(month, year)); + let mut m_days = u64::from(days_in_month(month, year)); while m_days <= days { + println!("Days in month {month}: {m_days}"); days -= m_days; month += 1; + m_days = u64::from(days_in_month(month, year)); } let seconds = ts % SECS_PER_DAY; let minutes = seconds / 60;