in reply to Re: Doomsday algorithm
in thread Doomsday algorithm
And you probably want something like:
@anchor_day_week = qw(tuesday wednesday thursday friday saturday sunda +y monday) [$year_anchor_day+1..6,0..$year_anchor_day];
...though I dislike repeating $year_anchor_day. This just changes the repetition:
push @anchor_day_week, splice @anchor_day_week, 0, $year_anchor_day;
...so a function to do this for you would be appropriate, even if it's only used once.
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Doomsday algorithm
by soonix (Chancellor) on Sep 07, 2015 at 15:19 UTC |