Items include a last modified (DTSTAMP) date

This commit is contained in:
daladim 2021-04-14 21:19:32 +02:00
parent e24fab2ccb
commit 8e35f4c579
7 changed files with 119 additions and 12 deletions

View file

@ -5,6 +5,7 @@ use std::str::FromStr;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use url::Url;
use chrono::{DateTime, Utc};
use crate::resource::Resource;
use crate::calendar::CalendarId;
@ -39,6 +40,13 @@ impl Item {
}
}
pub fn last_modified(&self) -> &DateTime<Utc> {
match self {
Item::Event(e) => e.last_modified(),
Item::Task(t) => t.last_modified(),
}
}
pub fn sync_status(&self) -> &SyncStatus {
match self {
Item::Event(e) => e.sync_status(),