Anonymous user
Five weekends: Difference between revisions
Updated to work with version 1.4 of Nim.
m (→{{header|Phix}}: use a more explicit test for "Friday") |
(Updated to work with version 1.4 of Nim.) |
||
Line 4,583:
const LongMonths = {mJan, mMar, mMay, mJul, mAug, mOct, mDec}
var sumNone = 0
Line 4,591 ⟶ 4,588:
var none = true
for month in LongMonths:
if initDateTime(1, month, year, 0, 0, 0).weekday == dFri:
none = false
if none: inc sumNone
echo "
{{out}}
<pre>March 1901
Line 4,611 ⟶ 4,607:
January 2100
October 2100
Years without a 5 weekend month: 29</pre>
|