Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,20 +0,0 @@
$fiveWeekends = @()
$yearsWithout = @()
foreach ($y in 1900..2100) {
$hasFiveWeekendMonth = $FALSE
foreach ($m in @("01","03","05","07","08",10,12)) {
if ((Get-Date "$y-$m-1").DayOfWeek -eq "Friday") {
$fiveWeekends += "$y-$m"
$hasFiveWeekendMonth = $TRUE
}
}
if ($hasFiveWeekendMonth -eq $FALSE) {
$yearsWithout += $y
}
}
Write-Output "Between the years 1900 and 2100, inclusive, there are $($fiveWeekends.count) months with five full weekends:"
Write-Output "$($fiveWeekends[0..4] -join ","),...,$($fiveWeekends[-5..-1] -join ",")"
Write-Output ""
Write-Output "Extra Credit: these $($yearsWithout.count) years have no such month:"
Write-Output ($yearsWithout -join ",")