mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-21 21:04:41 +01:00
fix event countdowns not skipping past events
This commit is contained in:
parent
4f1e43e923
commit
258d4639d7
|
@ -51,6 +51,7 @@ def main [] {
|
||||||
let next_events = open ~/Docs/dates.csv
|
let next_events = open ~/Docs/dates.csv
|
||||||
| update datetime {|ev| $ev.datetime | into datetime }
|
| update datetime {|ev| $ev.datetime | into datetime }
|
||||||
| sort-by datetime
|
| sort-by datetime
|
||||||
|
| filter {|ev| ($ev.datetime > (date now))}
|
||||||
| first
|
| first
|
||||||
| each {|ev| $"(ansi attr_bold)($ev.event)(ansi reset) in (ansi attr_bold)(tfmt ($ev.datetime - (date now)))s(ansi reset)" };
|
| 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)";
|
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