Day of the week: Difference between revisions

Line 55:
 
=={{header|Ada}}==
{{incorrect|Ada}}
<lang ada>with Ada.Calendar.Formatting; use Ada.Calendar.Formatting;
with Ada.Text_IO; use Ada.Text_IO;
Line 61 ⟶ 60:
procedure Yuletide is
begin
for Year in Ada2008.Calendar.Year_Number2121 loop -- 1901..2399
if Day_Of_Week (Time_Of (Year, 12, 25)) = Sunday then
Put_Line (Image (Time_Of (Year, 12, 25)));
Line 69 ⟶ 68:
Sample output:
<pre style="height:30ex;overflow:scroll">
1904-12-25 00:00:00
1910-12-25 00:00:00
1921-12-25 00:00:00
1927-12-25 00:00:00
1932-12-25 00:00:00
1938-12-25 00:00:00
1949-12-25 00:00:00
1955-12-25 00:00:00
1960-12-25 00:00:00
1966-12-25 00:00:00
1977-12-25 00:00:00
1983-12-25 00:00:00
1988-12-25 00:00:00
1994-12-25 00:00:00
2005-12-25 00:00:00
2011-12-25 00:00:00
2016-12-25 00:00:00
Line 101 ⟶ 85:
2112-12-25 00:00:00
2118-12-25 00:00:00
2129-12-25 00:00:00
2135-12-25 00:00:00
2140-12-25 00:00:00
2146-12-25 00:00:00
2157-12-25 00:00:00
2163-12-25 00:00:00
2168-12-25 00:00:00
2174-12-25 00:00:00
2185-12-25 00:00:00
2191-12-25 00:00:00
2196-12-25 00:00:00
2203-12-25 00:00:00
2208-12-25 00:00:00
2214-12-25 00:00:00
2225-12-25 00:00:00
2231-12-25 00:00:00
2236-12-25 00:00:00
2242-12-25 00:00:00
2253-12-25 00:00:00
2259-12-25 00:00:00
2264-12-25 00:00:00
2270-12-25 00:00:00
2281-12-25 00:00:00
2287-12-25 00:00:00
2292-12-25 00:00:00
2298-12-25 00:00:00
2304-12-25 00:00:00
2310-12-25 00:00:00
2321-12-25 00:00:00
2327-12-25 00:00:00
2332-12-25 00:00:00
2338-12-25 00:00:00
2349-12-25 00:00:00
2355-12-25 00:00:00
2360-12-25 00:00:00
2366-12-25 00:00:00
2377-12-25 00:00:00
2383-12-25 00:00:00
2388-12-25 00:00:00
2394-12-25 00:00:00
</pre>
 
Anonymous user