Long year: Difference between revisions

→‎{{header|APL}}: Add implementation
(Add Modula-2)
(→‎{{header|APL}}: Add implementation)
Line 242:
</pre>
 
=={{header|APL}}==
<lang apl>dec31wd ← {7|(⍵+⌊(⍵÷4)+(¯1×⌊(⍵÷100))+⌊(⍵÷400))}
long ← { (4 = dec31wd ⍵) ∨ (3 = dec31wd (⍵ - 1)) }</lang>
 
{{Out}}
<pre> (long y)/y←1800+⍳300
1801 1807 1812 1818 1824 1829 1835 1840 1846 1852 1857 1863 1868 1874 1880 1885
1891 1896 1903 1908 1914 1920 1925 1931 1936 1942 1948 1953 1959 1964
1970 1976 1981 1987 1992 1998 2004 2009 2015 2020 2026 2032 2037 2043
2048 2054 2060 2065 2071 2076 2082 2088 2093 2099</pre>
=={{header|AppleScript}}==
 
1,480

edits