cal passes

This commit is contained in:
Henry Schimke
2022-09-15 17:03:56 -05:00
parent 2768ca4b3b
commit f8dfd9de23
4 changed files with 73 additions and 20 deletions

View File

@@ -130,7 +130,21 @@ fn matchSingleVCardPrefixedField(prefix: &str, rawText: &str) -> String {
if values.is_empty() {
"".to_owned()
} else {
values.get(0).unwrap().clone()
let tz_mod = if values.len() > 1 {
if let Some(v) = values.get(values.len()-2) {
if let Some(tz_loc) = v.find("TZID=") {
v[tz_loc+5..].to_owned()
}else {
"".to_owned()
}
}else {
"".to_owned()
}
}else {
"".to_owned()
};
let root_time = values.last().unwrap().clone();
format!("{}{}",root_time,tz_mod)
}
} else {
"".to_owned()