Number of Days After January 1
|
03-11-2019, 02:25 AM
Post: #1
|
|||
|
|||
Number of Days After January 1
Introduction
The program DATENO calculates the number of days from January 1. The program prompts whether we are working in a leap year or not. With D = Day and M = Month, the days between January 1 and any other date within the calendar year is: If M = 1 and M = 2 Then DATE# = int(30.6 * M + 368.8) + D - 400 Otherwise, DATE# = int(30.6 * M + 1.6) +D - 35 (non-leap year) DATE# = int(30.6 * M + 1.6) + D - 34 (leap year) HP 41C/DM 41L Program: DATENO (^T: beginning of an alpha string) Code: 01 LBL^T DATENO Examples Days between January 1 and February 16 (M = 2, D = 16): 46 Days between January 1 and October 1 (M = 10, D = 1): (Non-leap year): 273 (Leap year): 274 Link to blog post: https://edspi31415.blogspot.com/2019/03/...-days.html |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Number of Days After January 1 - Eddie W. Shore - 03-11-2019 02:25 AM
RE: Number of Days After January 1 - Dieter - 03-11-2019, 06:53 PM
Number of Days After March 1st - Thomas Klemm - 03-11-2019, 08:30 PM
RE: Number of Days After January 1 - Dieter - 03-14-2019, 07:20 PM
|
User(s) browsing this thread: 1 Guest(s)