Sure - but the Mondays we're interested in would probably need to be in local timezone and DST, not GMT. I'm not really sure the code would fail, but I wouldn't bet I get the correct list of dates regardless when the calculation is done either.
I'm not sure the back-and-forth between localtime and gmtime works OK for this calculation - but consider that the Mondays surrounding a DST change date are 7*86400 +- 3600 seconds apart in 'real life' - using 7*86400 instead might place me a day ahead or behind if I'm somehwere near midnight when making the calculation.
Just a warning about the not-at-all-trivial datetime calculations.
| [reply] [Watch: Dir/Any] |
| [reply] [Watch: Dir/Any] |