Sha256: 41aeef46b84b5cf738f865f072bff05e2981ceab040c668172b2c42bf8a2fea7
Contents?: true
Size: 384 Bytes
Versions: 24
Compression:
Stored size: 384 Bytes
Contents
function Test-LeapYear { param( [int]$year ) # This could be solved using the native system.datetime object # but that isn't in the spirit of exercism. #[system.datetime]::isleapyear($year) # Instead solve using math if ( $year % 4 -eq 0 -and $year % 100 -ne 0 -or $year % 400 -eq 0) { return $True } else { return $False } }
Version data entries
24 entries across 24 versions & 1 rubygems