Day of the week: Difference between revisions
Content added Content deleted
m (→using DATE iso: added/changed comments and whitespace.) |
|||
Line 2,028: | Line 2,028: | ||
2118 |
2118 |
||
</pre> |
</pre> |
||
{{works with|AOS}} |
|||
<lang Oberon2> |
|||
MODULE DaysOfWeek; (** AUTHOR ""; PURPOSE ""; *) |
|||
IMPORT |
|||
Out := KernelLog, Dates; |
|||
PROCEDURE Do*; |
|||
VAR |
|||
date: Dates.DateTime; |
|||
i,y,w,wd: LONGINT; |
|||
BEGIN |
|||
FOR i := 2008 TO 2121 DO |
|||
date.year := i;date.month :=12; date.day := 25; |
|||
date.hour := 0;date.minute := 0; date.second := 0; |
|||
Dates.WeekDate(date,y,w,wd); |
|||
IF wd = 7 THEN Out.Int(i,0);Out.Ln END |
|||
END |
|||
END Do; |
|||
END DaysOfWeek. |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
2011 |
|||
2016 |
|||
2022 |
|||
2033 |
|||
2039 |
|||
2044 |
|||
2050 |
|||
2061 |
|||
2067 |
|||
2072 |
|||
2078 |
|||
2089 |
|||
2095 |
|||
2101 |
|||
2107 |
|||
2112 |
|||
2118 |
|||
</pre> |
|||
=={{header|Objective-C}}== |
=={{header|Objective-C}}== |
||