(15C) Delta Days [12C Actual Day Basis] - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (15C) Delta Days [12C Actual Day Basis] (/thread-6741.html) |
(15C) Delta Days [12C Actual Day Basis] - Nick - 08-27-2016 08:14 PM Formula: Delta Days = D2 - D1 (Actual Day Basis; 365-366 Days / Year) - Note: Unlike the 12C formula, the 360 Basis result is not returned in Y. Instead, Z is copied to Y and T is copied to Z preserving stack and constant operation. Input: X = D2 (Date To) ; Y = D1 (Date From) Output: X = Delta Days (Number of Days Between Dates) Requires: (15C) MM.DDYYYY or DD.MMYYYY to Julian Day [Stack-Only] Note: If you are only interested in Delta Days and do not require the standard Julian Day, you can conserve memory (and improve performance) by using a modified Julian Day, discarding lines 81 - 86. Enjoy, Nick Code: 01 LBL 01 Comments: - Replace Steps 8 and 11 with your label for the Julian Day function. - Temp: R.4 (X); R.5 (D1.JD); R.6 (Z); R.7 (T) - Steps 13 - 15 set LSTx to D2 - Steps 16 - 19 restore the stack and copy the constant |