Day of the week: Difference between revisions
Content added Content deleted
m (→{{header|GAP}}) |
(Updated D entry) |
||
Line 488: | Line 488: | ||
void main() { |
void main() { |
||
"Christmas comes on a Sunday in the years:".writeln; |
|||
iota(2008, 2122) |
|||
.filter!(y => Date.fromSimpleString(y.text ~ "-Dec-25").dayOfWeek == |
|||
DayOfWeek.sun) |
|||
.writeln; |
|||
} |
|||
}</lang> |
}</lang> |
||
{{out}} |
{{out}} |
||
<pre>Christmas comes on a Sunday in the years: |
<pre>Christmas comes on a Sunday in the years: |
||
[2011, 2016, 2022, 2033, 2039, 2044, 2050, 2061, 2067, 2072, 2078, 2089, 2095, 2101, 2107, 2112, 2118]</pre> |
|||
2011 |
|||
2016 |
|||
2022 |
|||
2033 |
|||
2039 |
|||
2044 |
|||
2050 |
|||
2061 |
|||
2067 |
|||
2072 |
|||
2078 |
|||
2089 |
|||
2095 |
|||
2101 |
|||
2107 |
|||
2112 |
|||
2118</pre> |
|||
=={{header|Delphi}}== |
=={{header|Delphi}}== |