Day of the week: Difference between revisions
Content added Content deleted
(→{{header|R}}: +1) |
|||
Line 1,675: | Line 1,675: | ||
as.numeric(format(xmas[weekdays(xmas)== 'Sunday'], "%Y")) |
as.numeric(format(xmas[weekdays(xmas)== 'Sunday'], "%Y")) |
||
</lang> |
</lang> |
||
<lang r>#Still another solution, using ISOdate and weekdays |
|||
(2008:2121)[weekdays(ISOdate(2008:2121, 12, 25)) == "Sunday"] |
|||
# Simply replace "Sunday" with whatever it's named in your country, |
|||
# or set locale first, with |
|||
Sys.setlocale(cat="LC_ALL", "en")</lang r> |
|||
=={{header|REBOL}}== |
=={{header|REBOL}}== |