(20S) and (21S) Number of Days Since January 1 - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (20S) and (21S) Number of Days Since January 1 (/thread-12999.html) |
(20S) and (21S) Number of Days Since January 1 - Eddie W. Shore - 05-20-2019 12:52 PM Days Since January 1 Calculate the number of days since January 1. For more information, please see: http://edspi31415.blogspot.com/2019/03/ti-84-plus-and-hp-41c-number-of-days.html Input: R1: day R2: month R3: 0 if we are working in a non-leap year, 1 if we are working in a leap year Output: R4: number of days since January 1 Program: Code:
Example 1: 1/1/2019 - 5/7/2019 (non-leap year) R1: 7, R2: 5, R3: 0 Result: R4 = 126 Example 2: 1/1/2020 - 11/14/2020 (leap year) R1: 14, R2: 11, R3: 1 Result: R4 = 318 |