Les Forums de base > TEA 4 Tous

Easter Sunday in 2024 is on ?

(1/1)

Arenas:
Easter Sunday in 2024 is on ?

Us PowerShell any version
@

=================

cls

$year = Get-Date -Format "yyyy"

$year = "$year"
$g = $year % 19
$s = [math]::Floor($year / 100)
$k = [math]::Floor(($s - 17) / 25)
$i = $s - [math]::Floor($s / 4) - [math]::Floor(($s - $k) / 3) + 19 * $g + 15
$i = $i - 30 * [math]::Floor($i / 30)
$i = $i - [math]::Floor($i / 28) * ([math]::Floor($g / 11) + 1) * ([math]::Floor((29 / ($i + 1))))
$j = $year + [math]::Floor($year / 4) + $i + 2 - $s + [math]::Floor($s / 4)
$j = $j - 7 * [math]::Floor($j / 7)
$l = $i - $j
$month = 3 + [math]::Floor(($l + 40) / 44)
$day = $l + 28 - 31 * [math]::Floor($month / 4)
""
Write-Host "Easter Sunday in $year is on is on $day-$month"

""

Klaatou:
"is on is on" ;) mais ça marche

Navigation

[0] Index des messages

Utiliser la version classique