Page 1 sur 1

JulianToGregorian (pour archive)

Publié : jeu. 19/déc./2013 19:06
par Mesa

Code : Tout sélectionner

; DWORD JulianToGregorian(DWORD Yj, DWORD Mj, DWORD Dj, DWORD* Yg, DWORD* Mg, DWORD* Dg)
;
; This function converts the Julian date to the adequate Gregorian date.
;
; Parameters:
;	Yj - year of the Julian date,
;	Mj - month of the Julian date,
;	Dj - day of the Julian date,
;	Yg - pointer to variable where the calculated year number of the Gregorian date will be stored,
;	Mg - pointer to variable where the calculated month number of the Gregorian date will be stored,
;	Dg - pointer to variable where the calculated day number of the Gregorian date will be stored.
;
; Returned values:
;	* 0 for the valid Julian date,
;	* -1 in opposite case.
;
Procedure.l JulianToGregorian( Yj.l, Mj.l, Dj.l, Yg.l, Mg.l, Dg.l)
  Protected tmpeax.l
  EnableASM
  juliantonum:
  DateToAbsDayNum( Yj, Mj, Dj, 0)
  MOV tmpeax, eax
  TEST	eax, eax
  JZ	l_juliantogregorian_error
  
  numtogregorian:
  AbsDayNumToDate( tmpeax, 1, Yg, Mg, Dg)
  JMP	l_juliantogregorian_theend
  
  error:
  MOV	eax, -1
  
  theend:
  
  DisableASM
  ProcedureReturn

EndProcedure
M.

Re: JulianToGregorian (pour archive)

Publié : dim. 21/déc./2014 23:12
par kernadec
bonsoir aleeza
voici l'adresse ou Mesa à terminé ce projet:
http://www.purebasic.fr/french/viewtopi ... 12&t=14145

Cordialement

Re: JulianToGregorian (pour archive)

Publié : lun. 22/déc./2014 1:01
par falsam
aleeza est un bot ou un plaisantin qui n'a fait que répéter les commentaires du code de Mesa. Son message ainsi que les commentaires qui suivent sont à mon avis à supprimer.

PS: Ce n'est pas la première fois que je vois cette signature (sara)

Re: JulianToGregorian (pour archive)

Publié : lun. 22/déc./2014 9:36
par kernadec
bonjour falsam
OOoooh, M... :?
Mais bon voilà ....en fait cela donne une infos pour la personne qui arrive sur ce post, il pourra suivre ce thème :D
bonne journée