summaryrefslogtreecommitdiffstats
path: root/src/timetype.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/timetype.rs')
-rw-r--r--src/timetype.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timetype.rs b/src/timetype.rs
index cbb3ee0..063a27f 100644
--- a/src/timetype.rs
+++ b/src/timetype.rs
@@ -396,7 +396,7 @@ fn end_of_month(tt: TimeType) -> Result<TimeType> {
els @ TT::Addition(_, _) |
els @ TT::Subtraction(_, _) => Err(KE::from_kind(KEK::CannotCalculateEndOfMonthOn(els))),
TT::Moment(m) => {
- let last_day = get_num_of_days_in_month(m.year(), m.month());
+ let last_day = get_num_of_days_in_month(m.year() as i64, m.month() as i64) as u32;
Ok(TT::moment(NaiveDate::from_ymd(m.year(), m.month(), last_day).and_hms(0, 0, 0)))
},
TT::EndOfYear(e) => do_calculate(*e),