in reply to Find 30 days from today's date
use feature 'say';
my $thirty_days_ago = DateTime->today->subtract(days => 30);
my $thirty_days_ago = DateTime->today(time_zone => 'local')->subtract(
+days => 30);
Note that the above solution will fail two days a year in time zones with no midnight on a DST change. (There is at least one such time zone.) Workaround:
my $thirty_days_ago = DateTime->now(time_zone => 'local')->set_hour(12
+)->subtract(days => 30);
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (534 votes). Check out past polls.