Your question is unclear. I think you're asking for the last Sunday before the first day of the current month.
use DateTime qw( ); my $dt = DateTime->today(); $dt->set_day(1); $dt->subtract( days => $dt->day_of_week() ); print($dt->ymd(), "\n");
In reply to Re: Calculating latest 'Sunday' date on the first of the month
by ikegami
in thread Calculating latest 'Sunday' date on the first of the month
by Cicatrix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |