n_cst_datetime bugs

Topics: General
Developer
Aug 28, 2014 at 9:35 PM
Hi Guys,

first of all: thanks for the PFC it's very handy when talking PowerBuilder :)

second: I've found some bugs while using n_cst_datetime (of_Julian and of_Gregorian) functions... they are returning weird values... (probably missed some 1900 checks and also gets lost when considering leap years)

Well I've done some research myself and fixed it... I've based my calculations on the U.S. Naval Observatory formulas. ( http://aa.usno.navy.mil/data/docs/JulianDate.php )
I'll be happy to give you guys the fixed code.

Improvements:
Calculate the datetime and date instead of only date.
Calculate the leap years properly
Calculate the Excluded Gregorian dates on October 4 ~15 of 1582 CE.

Considerations:
Since Powerbuilder works with dates on CE (Common Era) I've also created a check for that.

Please let me know how can i send you the fix code, so you guys don't have to go over it again...
Once again thanks you all...

Best Regards
Ruanito Machado Pombo
Coordinator
Sep 5, 2014 at 2:16 AM
Please let me know how can i send you the fix code
Submit a request for developer status.
Developer
Sep 5, 2014 at 8:56 PM
Request sent... just waiting for reply so i can send you guys the code for review and approval...
Developer
Sep 5, 2014 at 9:49 PM
fix uploaded as per my comments only 2 functions were changed and 1 function created... I'm waiting for your review and feedback... thanks you guys !!!

Just to make sure, please copy only the code for those 3 functions for i'm not sure if the version of this object is the latest one or not.