Day of the week: Difference between revisions
Content deleted Content added
FBSL |
|||
Line 727: | Line 727: | ||
<lang factor>USING: calendar math.ranges prettyprint sequences ; |
<lang factor>USING: calendar math.ranges prettyprint sequences ; |
||
2008 2121 [a,b] [ 12 25 <date> sunday? ] filter .</lang> |
2008 2121 [a,b] [ 12 25 <date> sunday? ] filter .</lang> |
||
=={{header|FBSL}}== |
|||
<lang qbasic>#APPTYPE CONSOLE |
|||
#OPTION STRICT |
|||
'In what years between 2008 and 2121 will the 25th of December be a Sunday? |
|||
dim date as integer |
|||
dim dayname as string |
|||
for dim year = 2008 to 2121 |
|||
date = year * 10000 + 1225 |
|||
dayname = dateconv(date,"dddd") |
|||
if dayname = "Sunday" then |
|||
print "Christmas Day is on a Sunday in ", year |
|||
end if |
|||
next |
|||
</lang> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |