Post Reply 
Date from DOY. (A.Pouplier)
01-12-2015, 05:44 PM
Post: #10
RE: Date from DOY. (A.Pouplier)
Code:
EXPORT DOY(DATE)
BEGIN
LOCAL B:=2,AN,M,J;
IP(DATE)▶J;
IP(FP(DATE)*100)▶M;
IP(FP(FP(DATE)*100)*10000)▶AN;
//LEAP YEAR ?
CASE
IF (NOT(AN MOD 4) AND AN MOD 100)
 OR(NOT(AN MOD 400))
  THEN B:=1; // LEAP
  END;

IF AN<1582 AND irem(AN,4)==0
   THEN B:=1; //LEAP
   END;
END;

RETURN IP(275*M/9)-B*IP((M+9)/12)+J-30;
END;

I thing i have finded a way to paste correctely codes, yes i hope...
Gérard.

Gérard.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Date from DOY. (A.Pouplier) - Wolfgang - 01-12-2015, 02:57 PM
RE: Date from DOY. (A.Pouplier) - Wolfgang - 01-12-2015, 05:04 PM
RE: Date from DOY. (A.Pouplier) - Han - 01-12-2015, 05:06 PM
RE: Date from DOY. (A.Pouplier) - ggauny@live.fr - 01-12-2015 05:44 PM



User(s) browsing this thread: 2 Guest(s)