Skip to content

Commit

Permalink
feat: add end date
Browse files Browse the repository at this point in the history
  • Loading branch information
zeldan committed Jul 29, 2024
1 parent c652b9d commit 41f59c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ async fn main() {
});
for next_event in next_events {
let event_start = next_event.start.as_ref().unwrap().date_time.unwrap();
let event_end = next_event.end.as_ref().unwrap().date_time.unwrap();
let summary = next_event.summary.as_ref().unwrap().to_string();
let formatted_event = format!(
"{:02}:{:02} - {:?}\n\n",
"{:02}:{:02} - {:02}:{:02}: {}\n\n",
tz.from_utc_datetime(&event_start.naive_local()).hour(),
event_start.minute(),
tz.from_utc_datetime(&event_end.naive_local()).hour(),
event_end.minute(),
summary
);

Expand Down

0 comments on commit 41f59c1

Please sign in to comment.