Implement --range
This commit is contained in:
parent
ff627b98df
commit
e9ec2998f0
4 changed files with 91 additions and 33 deletions
|
|
@ -106,7 +106,11 @@ impl<'a> CommandState<'a> {
|
|||
.filter(|&until| until < range_until)
|
||||
.unwrap_or(range_until);
|
||||
|
||||
DateRange::new(from, until)
|
||||
if from <= until {
|
||||
Some(DateRange::new(from, until))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// Add an entry, respecting [`Self::from`] and [`Self::until`]. Does not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue