from math import * def DATE(j,m,a,jj,mm,aa): if (m<=2): d1=365*a+((a-1)//4)+(31*(m-1))-((a-1)//100)+((a-1)//400)+j d2=d1-694325 d3=365*aa+((aa-1)//4)+(31*(mm-1))-((aa-1)//100)+((aa-1)//400)+jj d4=d3-694325 r=d4-d2 else: d1=365*a+(a//4)+(31*(m-1))-(((m-1)*0.4)+2.7)-(a//100)+(a//400)+j d2=d1-694325 d3=365*aa+(aa//4)+(31*(mm-1))-(((mm-1)*0.4)+2.7)-(aa//100)+(aa//400)+jj d4=d3-694325 r=d4-d2 print("Nombre de jours=",r) print("Soit en ans=",ceil(r//365)) def JS(j,m,a): if (m<=2): d1=365*a+((a-1)//4)+(31*(m-1))-((a-1)//100)+((a-1)//400)+j else: d1=365*a+(a//4)+(31*(m-1))-(((m-1)*0.4)+2.7)-(a//100)+(a//400)+j d2=ceil(d1-(7*int(d1//7))) if d2==0: print("\n Samedi",j,"/",m,"/",a) elif d2==1: print("\n Dimanche",j,"/",m,"/",a) elif d2==2: print("\n Lundi",j,"/",m,"/",a) elif d2==3: print("\n Mardi",j,"/",m,"/",a) elif d2==4: print("\n Mercredi",j,"/",m,"/",a) elif d2==5: print("\n Jeudi",j,"/",m,"/",a) elif d2==6: print("\n Vendredi",j,"/",m,"/",a) else: print("erreur")