fix event countdowns not skipping past events
This commit is contained in:
parent
4f1e43e923
commit
258d4639d7
1 changed files with 1 additions and 0 deletions
|
@ -51,6 +51,7 @@ def main [] {
|
|||
let next_events = open ~/Docs/dates.csv
|
||||
| update datetime {|ev| $ev.datetime | into datetime }
|
||||
| sort-by datetime
|
||||
| filter {|ev| ($ev.datetime > (date now))}
|
||||
| first
|
||||
| each {|ev| $"(ansi attr_bold)($ev.event)(ansi reset) in (ansi attr_bold)(tfmt ($ev.datetime - (date now)))s(ansi reset)" };
|
||||
print $"Hi jade, you're on HRT for (ansi reset)(ansi attr_bold)((date now) - ('2024-02-18T20:53' | into datetime) | format duration month)s(ansi reset) now! | Next Event: ($next_events)";
|
||||
|
|
Loading…
Reference in a new issue