Day of the week: Difference between revisions

(Added EasyLang implementation)
Line 4,600:
next
</syntaxhighlight>
 
=={{header|RPL}}==
RPL does not have any date library, so a specific instruction implements Zeller's congruence with a stack-oriented algorithm.
{{works with|Halcyon Calc|4.2.7}}
≪ IF OVER 2 ≤ THEN 1 - SWAP 12 + SWAP END
100 MOD LAST / IP
DUP 4 / IP SWAP DUP + - SWAP DUP 4 / IP + +
SWAP 1 + 13 * 5 / IP + +
7 MOD 5 + 7 MOD 1 +
'WKDAY' STO
 
≪ { }
2008 2121 FOR year
IF 25 12 year WKDAY 7 == THEN year + END
NEXT
EVAL
{{out}}
<pre>
1: { 2011 2016 2022 2033 2039 2044 2050 2061 2067 2072 2078 2089 2095 2101 2107 2112 2118 }
</pre>
 
=={{header|Ruby}}==
1,145

edits