mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-18 09:50:34 +01:00
parent
1b4e1e9c1a
commit
74c3431a2b
2 changed files with 3 additions and 0 deletions
|
@ -412,6 +412,7 @@ pub fn build_app() -> App<'static, 'static> {
|
||||||
Arg::with_name("changed-within")
|
Arg::with_name("changed-within")
|
||||||
.long("changed-within")
|
.long("changed-within")
|
||||||
.alias("change-newer-than")
|
.alias("change-newer-than")
|
||||||
|
.alias("newer")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.value_name("date|dur")
|
.value_name("date|dur")
|
||||||
.number_of_values(1)
|
.number_of_values(1)
|
||||||
|
@ -429,6 +430,7 @@ pub fn build_app() -> App<'static, 'static> {
|
||||||
Arg::with_name("changed-before")
|
Arg::with_name("changed-before")
|
||||||
.long("changed-before")
|
.long("changed-before")
|
||||||
.alias("change-older-than")
|
.alias("change-older-than")
|
||||||
|
.alias("older")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.value_name("date|dur")
|
.value_name("date|dur")
|
||||||
.number_of_values(1)
|
.number_of_values(1)
|
||||||
|
|
|
@ -12,6 +12,7 @@ impl TimeFilter {
|
||||||
humantime::parse_duration(s)
|
humantime::parse_duration(s)
|
||||||
.map(|duration| *ref_time - duration)
|
.map(|duration| *ref_time - duration)
|
||||||
.or_else(|_| humantime::parse_rfc3339_weak(s))
|
.or_else(|_| humantime::parse_rfc3339_weak(s))
|
||||||
|
.or_else(|_| humantime::parse_rfc3339_weak(&(s.to_owned() + " 00:00:00")))
|
||||||
.ok()
|
.ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue