paques.py

Created by schraf

Created on March 13, 2025

108 Bytes

Traduction en Python de la formule Excel =FLOOR(DATE(year,3,MOD(18.37*MOD(year,19)-6,29)),7)+29 permettant de trouver la date du dimanche de Pâques pour une année quelconque entre 1900 et 2099.

>>> easter(2025)
(20, 4, 2025)     # 20 avril 2025


def easter(y):
 j=int(y%19*18.37-6)%29
 r=j-(int(1.25*y+2+j)%7)
 t=r>2
 return r-31*t+29,3+t,y

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.