Post Reply 
Date from DOY. (A.Pouplier)
01-12-2015, 02:57 PM
Post: #4
RE: Date from DOY. (A.Pouplier)
... And here is number date to day number...

@at this time i've about 15 date functions in one program, this and other will be published next time...

Wolfgang


Code:


// DT2DN Date to Day Number
// nd numberdate (dd.mmyyyy), Leafyear y/n? (0 or 1)
// example DT2DN(29.112014,0) returns 333
// WMWK 2014-11-12
//
EXPORT DT2DN(nd,L)
BEGIN
LOCAL D,M;
   
   D:=IP(nd);
   M:=IP(((nd-D)*100));
//   Y:=((FP(((nd-D)*100))*10000));
CASE
      IF M <3 THEN RETURN IP((M-1)*(63-L)/2)+D;END;
      IF M >2 THEN RETURN  D+(IP((M+1)*30.6)-(63-L)); END;
END;
END;

[code]
[code]

HP 33C 34C 11C 41CX 12C 15C HP71B 35s 50g Prime Rev. A, C, D. DM 41X, 42. TI 58C, 59, 74, 92-II, Voyage 200, nspire CX II-T, Sanyo ICC 82D and more
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



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