diff --git a/dashboard/src/components/date.rs b/dashboard/src/components/date.rs index 0dd84e1..58dd44b 100644 --- a/dashboard/src/components/date.rs +++ b/dashboard/src/components/date.rs @@ -11,10 +11,11 @@ pub struct DatePrivate { impl Default for DatePrivate { fn default() -> Self { + let date = chrono::Local::now().date_naive(); + let year = date.year(); + let date = date.with_year(year + 10000).unwrap(); Self { - date: Rc::new(RefCell::new(IFC::from( - chrono::Local::now().date_naive().with_year(12023).unwrap(), - ))), + date: Rc::new(RefCell::new(IFC::from(date))), label: Rc::new(RefCell::new(gtk::Label::new(None))), } } diff --git a/dashboard/src/main.rs b/dashboard/src/main.rs index b65eaf8..b08d58e 100644 --- a/dashboard/src/main.rs +++ b/dashboard/src/main.rs @@ -102,7 +102,7 @@ pub fn main() { let now = Local::now(); let state = State { - date: IFC::from(now.date_naive().with_year(12023).unwrap()), + date: IFC::from(now.date_naive().with_year(now.year() + 10000).unwrap()), next_event: EVENTS.next_event(now.with_timezone(&Utc)).unwrap(), events: EVENTS.yearly_events(now.year()).unwrap(), transit: Some(transit),