aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuben Pollan2020-05-19 11:27:21 +0200
committerRuben Pollan2020-05-19 11:27:21 +0200
commit365e8d37f1d97bc2f0f062f4594fbae1a90be93a (patch)
treed42820a155357f15775a1fee7da06b2757c8900d /src
parenta27b69eca91495d81a229ae6a29698a563888359 (diff)
Set the actual duration for the end of the event
Diffstat (limited to 'src')
-rw-r--r--src/calendar.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/calendar.rs b/src/calendar.rs
index a46795b..303a2f8 100644
--- a/src/calendar.rs
+++ b/src/calendar.rs
@@ -109,7 +109,7 @@ fn duration(value: &str) -> Result<Duration, EventError> {
let mut acc = "".to_string();
for c in value.chars() {
match c {
- '0'...'9' => acc.push(c),
+ '0'..='9' => acc.push(c),
'-' => duration = -duration,
'W' | 'H' | 'M' | 'S' | 'D' => {
let count = acc.parse()?;
@@ -127,5 +127,5 @@ fn duration(value: &str) -> Result<Duration, EventError> {
_ => (),
}
}
- Ok(Duration::weeks(1))
+ Ok(duration)
}