Day of the week: Difference between revisions

Added Kotlin
(Added Kotlin)
Line 1,701:
2011 2016 2022 2033 2039 2044 2050 2061 2067 2072 2078 2089 2095 2101 2107 2112 2118
</lang>
 
=={{header|Kotlin}}==
<lang scala>// version 1.0.6
 
import java.util.Calendar
import java.util.GregorianCalendar
 
fun main(args: Array<String>) {
println("Christmas day in the following years falls on a Sunday:\n")
val calendar = GregorianCalendar(2008, Calendar.DECEMBER, 25)
for (year in 2008 .. 2121) {
if (Calendar.SUNDAY == calendar[Calendar.DAY_OF_WEEK]) println(year)
calendar.add(Calendar.YEAR, 1)
}
}</lang>
 
{{out}}
<pre>
Christmas day in the following years falls on a Sunday:
 
2011
2016
2022
2033
2039
2044
2050
2061
2067
2072
2078
2089
2095
2101
2107
2112
2118
</pre>
 
=={{header|Lasso}}==
9,490

edits