Link | lp_date_JulianSplit |
Author | Bil Corry |
Category | Date |
Version | 8.x |
License | Public Domain |
Posted | 21 Apr 2006 |
Updated | 21 Apr 2006 |
More by this author... |
Returns a map of the Julian date and time, given a Julian date.
Requires [lp_decimal_float] [lp_decimal_fixed] [lp_decimal_precisionset]
lp_date_JulianSplit: 2450123.7; // map: (time)=(0.2), (date)=(2450123.5)
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
[ define_tag:'lp_date_JulianSplit', -description='Returns a map of the Julian date and time, given a Julian date.', -priority='replace', -required='JulianDate'; local:'jd' = (decimal: #juliandate); if: (lp_decimal_float: #jd) >= 0.5; local:'jd0' = (decimal:(lp_decimal_fixed: #JulianDate)) + 0.5; else; local:'jd0' = (decimal:(lp_decimal_fixed: #JulianDate)) - 0.5; /if; return: (map: 'date' = (lp_decimal_precisionset:#jd0), 'time' = (lp_decimal_precisionset:(math_abs: #jd - #jd0))); /define_tag; ]
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft