Day of the week: Difference between revisions

no edit summary
(add Tiny BASIC)
No edit summary
Line 348:
2118
</pre>
=={{header|APL}}==
<lang apl>⍝ Based on the simplified calculation of Zeller's congruence, since date is after March 1st, no adjustment required
⎕IO ← 0 ⍝ Indices are 0-based
y ← 2008 + ⍳114. ⍝ Years from 2008 to 2121
⍝ Simplified Zeller function operating on table of date formatted as 114 rows and 3 columns of (day, month, year)
⍝ 0 = Saturday, 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday
zeller ← { 7|+/(((1↑⍴⍵),6)⍴1 1 1 1 ¯1 1)× ⌊(((⍴⍵)⍴1 13 1)×⍵+(⍴⍵)⍴0 1 0)[;0 1 2 2 2 2]÷((1↑⍴⍵),6)⍴1 5 1 4 100 400}
result ← ( 1 = Zeller 25,[1]12,[0.5]y) / y
{{out}}
<pre>
result
2011 2016 2022 2033 2039 2044 2050 2061 2067 2072 2078 2089 2095 2101 2107 2112 2118
</pre>
</lang>
 
=={{header|AppleScript}}==
Anonymous user