Skip to content

Commit

Permalink
chore: update icalendar
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodie committed Nov 2, 2023
1 parent 729f18a commit 15af0f2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
38 changes: 34 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ actix-web = { version = "3", optional = true }
actix-files = { version = "0.6", optional = true }

bill = { version = "0.4", features = ["serialization"] }
icalendar = "0.10"
icalendar = "0.15"

slug = "0.1"
tempdir = "0.3"
Expand Down
8 changes: 4 additions & 4 deletions src/project/spec_yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::str::FromStr;

use anyhow::bail;
use bill::{Bill, Currency, Tax};
use icalendar::{Calendar, Component, Event as CalEvent};
use icalendar::{Calendar, Component, Event as CalEvent, EventLike as _};
use yaml_rust::Yaml;

use super::{
Expand Down Expand Up @@ -80,10 +80,10 @@ impl HasEvents for Project {
}

if let Some(end) = event.end {
cal_event.start_date(event.begin);
cal_event.end_date(end);
cal_event.starts(event.begin);
cal_event.ends(end);
} else {
cal_event.all_day(event.begin);
cal_event.all_day(event.begin.naive_local());
}

cal_event.summary(self.name().unwrap_or("unnamed"));
Expand Down

0 comments on commit 15af0f2

Please sign in to comment.