in reply to How to calculate if today is before May 1
Dates are delicate things, and you must use care and recommended modules, as already shown.
But for such a trivial task you can simply check if you are in January-April (months 0-3 in localtime's 4th element in the list form) ie (localtime(time))[4]<=3 to be sure being before 1st of May:
perl -E "say qq(we are ),(localtime(time))[4]<=3?qq(BEFORE):qq(AFTER), +qq( 1st of May)" we are AFTER 1st of May
L*
|
|---|