diff options
Diffstat (limited to 'src/gui/app.rs')
-rw-r--r-- | src/gui/app.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/app.rs b/src/gui/app.rs index 4ed864b..c0fc038 100644 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -41,9 +41,10 @@ impl App { .build(), ); - let today = chrono::offset::Local::today().naive_utc(); + let today = chrono::offset::Local::now().naive_utc().date(); + // TODO: error handling let start_date = - NaiveDate::from_isoywd(today.year(), today.iso_week().week(), Weekday::Mon); + NaiveDate::from_isoywd_opt(today.year(), today.iso_week().week(), Weekday::Mon).unwrap(); let end_date = start_date + Duration::days(7 * 4 - 1); let events = db::events::list_non_recurring_between(&conn, start_date, end_date)?; |