Day of the week: Difference between revisions
Content added Content deleted
No edit summary |
(→{{header|Ada}}: All sundays between 1901 and 2399) |
||
Line 10: | Line 10: | ||
with Ada.Calendar.Formatting; use Ada.Calendar.Formatting; |
with Ada.Calendar.Formatting; use Ada.Calendar.Formatting; |
||
with Ada.Text_IO; use Ada.Text_IO; |
with Ada.Text_IO; use Ada.Text_IO; |
||
procedure Yuletide is |
procedure Yuletide is |
||
begin |
begin |
||
for Year in |
for Year in Ada.Calendar.Year_Number loop -- 1901..2399 |
||
if Day_Of_Week (Time_Of (Year, 12, 25)) = Sunday then |
if Day_Of_Week (Time_Of (Year, 12, 25)) = Sunday then |
||
Put_Line (Image (Time_Of (Year, 12, 25))); |
Put_Line (Image (Time_Of (Year, 12, 25))); |
||
Line 21: | Line 21: | ||
</ada> |
</ada> |
||
Sample output: |
Sample output: |
||
<pre style="height:30ex;overflow:scroll"> |
|||
<pre> |
|||
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 |
2011-12-25 00:00:00 |
||
2016-12-25 00:00:00 |
2016-12-25 00:00:00 |
||
Line 39: | Line 54: | ||
2112-12-25 00:00:00 |
2112-12-25 00:00:00 |
||
2118-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> |
</pre> |
||