antonmedv/countdown

Add more units from sleep command

Soundtoxin opened this issue · 2 comments

I notice that at least d for days is not supported. I use this occasionally with the sleep command to do stuff like open a link with xdg-open in a couple days. It's also a bit more readable to see 12 days counting down than 288 hours.
Not sure if sleep supports bigger units than days, but if it does, it could be good to have those as well. w for weeks should be fairly unambiguous, and if you start using capitals, M could be months.

W is 13 days.
but how many days is M?

W is 13 days.

Do you mean 7 days?

but how many days is M?

Ideally it would calculate the time between the date (as in day #) this month and next, like Feb 18th to March 18th, or June 18th to July 18th. It wouldn't be a static number of days. Perhaps this is too complicated to do.