Problems? Is your data what you think it is? | |
PerlMonks |
Re: How to calculate if today is before May 1by shmem (Chancellor) |
on Dec 29, 2019 at 17:05 UTC ( [id://11110730]=note: print w/replies, xml ) | Need Help?? |
For "today":
Invoking that on 2020-05-01 will give you "after 2020-05-01". For distinguishig "before", "at" and "after" a simple ternary '? :' construct isn't enough. For TODAY as a date in any year, just construct the input for st2time() and the TODAY epoch timestamp (use that instead of time above) according to the format of TODAY.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
In Section
Seekers of Perl Wisdom
|
|