Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Honestly, I find those magical formulas° always too voodoo.
From a maintenance point of view they are horrible, because they don't scale well with new requirements. Even Doomsday fails if you go back before Gregorian calendar
Cheers Rolf °) don't know the correct term here... ³
updatethere is only a limited number of orders 7! so you could try a brute force search composing formulas based on inputs like substrings or word-length. I'm still not sure if the solution will be shorter than just a clever list.²
update²) tybaldt's solution with "motuwethfrsasu" is just an example of such a clever list. ³) kind of golfing, isn't it? In reply to Re^3: Challenge: sort weekdays in week-order (magical formula)
by LanX
|
|