sane-deadlines: fix threshold/date parsing
This commit is contained in:
parent
be33684d5d
commit
4361bd45c7
|
@ -33,7 +33,7 @@ sort "$deadlines" | while read line; do
|
||||||
# normalize dates into seconds since unix epoch
|
# normalize dates into seconds since unix epoch
|
||||||
deadline=$(date -d "$deadline_field" +%s)
|
deadline=$(date -d "$deadline_field" +%s)
|
||||||
threshold=$(echo "$threshold_field" | sed 's/d/day /g')
|
threshold=$(echo "$threshold_field" | sed 's/d/day /g')
|
||||||
birthtime=$(date -d "$deadline_field - ($threshold)" +%s)
|
birthtime=$(date -d "$deadline_field - $threshold" +%s)
|
||||||
|
|
||||||
# show the event iff it's near
|
# show the event iff it's near
|
||||||
if test "$now" -ge "$birthtime"; then
|
if test "$now" -ge "$birthtime"; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user