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
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) don't know the correct term here... ³
there 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.²
²) 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
in thread Challenge: sort weekdays in week-order (elegantly and efficiently)
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |