blob: 56eaf65648502ce3efbed87936ce58b784e237c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env -S nim r -d:release --verbosity:0 --hints:off
## The only way for a month to have 5 full weekends (Fri, Sat, Sun) is
## to be 31 days long and start on Friday:
##
## .... 567
## 1234 567
## 1234 567
## 1234 567
## 1234 567
import std/[times]
for year in 1900..2019:
for month in Month:
if getDaysInMonth(month, year) == 31 and
getDayOfWeek(1, month, year) == dFri:
echo ($month)[0..2], '-', year
|