diff --git a/Cargo.lock b/Cargo.lock index 9ba66b1ea..a3df9c6fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1401,8 +1401,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if 1.0.0", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -1571,11 +1573,13 @@ dependencies = [ [[package]] name = "icalendar" -version = "0.10.0" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9ef924cc883333ecdc23b8c4a677119ec6a2db9ef7748a2ae74e77c91ef14df" +checksum = "85aad69a5625006d09c694c0cd811f3655363444e692b2a9ce410c712ec1ff96" dependencies = [ "chrono", + "iso8601", + "nom", "uuid", ] @@ -1680,6 +1684,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "iso8601" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153" +dependencies = [ + "nom", +] + [[package]] name = "itertools" version = "0.11.0" @@ -1889,6 +1902,12 @@ dependencies = [ "unicase", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1983,6 +2002,16 @@ dependencies = [ "libc", ] +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "num-traits" version = "0.2.17" @@ -3354,11 +3383,12 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "0.8.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "getrandom 0.2.10", + "wasm-bindgen", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d64a45cfa..da1e38244 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/project/spec_yaml.rs b/src/project/spec_yaml.rs index 15370ba7e..9c14cfc4b 100644 --- a/src/project/spec_yaml.rs +++ b/src/project/spec_yaml.rs @@ -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::{ @@ -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"));