Hi, this: "if TODAY is before May 1 every year" is not clear to me.
Thinking about those aspects of your question should help lead to you to right solution.
(You can easily get today's date in ISO format with the core module Time::Piece: $now = Time::Piece->new->datetime;)my $d2 = "2019-12-29T12:34:56"; my $d1 = "2019-05-01T00:00:00"; say ($d2 lt $d1 ? "before" : "on or after");
Hope this helps!
In reply to Re: How to calculate if today is before May 1
by 1nickt
in thread How to calculate if today is before May 1
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |