Day of the week: Difference between revisions

Line 259:
Dec 25 2107
Dec 25 2112
Dec 25 2118</pre>
<lang FreeBASIC>' version 17-06-2015
</pre>
' Weekday And DateSerial only works with #Include "vbcompat.bi"
' compile with: fbc -s console
 
#Include "vbcompat.bi"
Dim As Double a
 
For yr As Integer = 2008 To 2121
a = DateSerial (yr, 12, 25)
If Weekday(a) = 1 Then Print Format(a, "dd-mm-yyyy") ' 1 = sunday, 2 = monday ...
Next
 
Print : Print "hit any key to end program"
Sleep
End</lang>
<pre>25-12-2011
25-12-2016
25-12-2022
25-12-2033
25-12-2039
25-12-2044
25-12-2050
25-12-2061
25-12-2067
25-12-2072
25-12-2078
25-12-2089
25-12-2095
25-12-2101
25-12-2107
25-12-2112
25-12-2118</pre>
 
=={{header|Batch File}}==
457

edits