Define jour_julien_hd()= Prgm :Local jr,mo,smo,an,san,dst :Local hr,h,mn,m,smn,sc,ssc :Local hd,b,c,d,e,t,n,i :0→jr:0→mo:0→smo:0→an:0→san:0→dst :0→hr:0→h:0→mn:0→m:0→smn:0→sc:0→ssc :0→hd:0→b:0→c:0→d:0→e:28→n:1720994.5→t:0→jj :©b et c sont des correctifs pour :© pour les dates>15 oct 1582 :setMode(5,2) :©-----------------------explique :Disp "" :Disp " Donner la date et l'heure en chiffres " :Disp "" :©Disp " DST: 0 pour hr Greenwish" :©Disp " 1 pour hr d'hivers, 2 hr pour été" :Disp "" :Disp " appuyez sur [enter] pour continuer" :For i,1,2:Disp "":EndFor :getKey(1) :©-----------------entrées utilisateur :Request "jour : ",jr :Request "mois : ",mo :Request "année : ",an :Request "heure",hr :Request "minute",mn :Request "seconde",sc :©Request "DST =",dst :©If dst<0 or dst>2:Goto err :©hr+dst→hr :mo→smo:an→san :mn→smn:sc→ssc :©------------------voir si bissextile :If mod(an,4)=0 and mod(an,100)≠0 or mod(an,400)=0 Then :29→n:EndIf :©-------------------- contrôle date :If jr<1:Goto err :If mo<1:Goto err :If an<−4712 or an=0 or an>9999:Goto err :If jr>30 Then : If mo=4 or mo=6 or mo=9 or mo=11:Goto err :EndIf :If jr>31 Then : If mo=1 or mo=3 or mo=5 or mo=7 or mo=8 or mo=10 or mo=12 : Goto err :EndIf :If mo=2 and jr>n:Goto err :©------------------ contrôle heure :If sc>60 Then : sc-60→sc:mn+1→mn :EndIf :If mn>60 Then : mn-60→mn:hr+1→hr :EndIf :If hr>23:hr-24→hr :If hr<0:hr+24→hr :©------------------Calc jour décim :((sc)/(60))→m :((m+mn)/(60))→h :hr+h→h :((h)/(24))→hd :©----------------------- calcul jj :If mo<3 Then : an-1→an:mo+12→mo :EndIf :int(((an)/(100)))→b :2-b+int(((b)/(4)))→c :int(365.25*an)→d :int(30.6001*(mo+1))→e :c+d+e+jr+hd+t→jj :©----------------------- affiche :For i,1,3:Disp "":EndFor :Disp "le",jr,"/",smo,"/",san,"à ",hr,":",smn,":",ssc :Disp "correspond au jour Julien" :Disp " ",jj :For i,1,2:Disp "":EndFor :Disp " Entrer pour sortir !" :getKey(1) :Goto fin :©----------------------- erreur :Lbl err :For i,1,2:Disp "":EndFor :Disp " le",jr,"/",smo,"/",san," !?" :Disp "" :Disp " Désolé cette date n'est pas valide" :For i,1,2:Disp "":EndFor :©-------------------------- fin :Lbl fin :EndPrgm