Number of Days After January 1
|
03-11-2019, 06:53 PM
(This post was last modified: 03-11-2019 07:00 PM by Dieter.)
Post: #2
|
|||
|
|||
RE: Number of Days After January 1
(03-11-2019 02:25 AM)Eddie W. Shore Wrote: The program DATENO calculates the number of days from January 1. Maybe you should add 1 to the result to get the more common "day of year", i.e. 1 January = day 1 and 31 December = day 365. (03-11-2019 02:25 AM)Eddie W. Shore Wrote: If M = 1 and M = 2 Then What about 31*M + D -32 ?-) Anyway, here is my attempt at a day-of-year program. I have derived the formulas myself, so beware. ;-) Please try it and report any errors you find. Code: 01 LBL "DOY" Usage: day [ENTER] month [ENTER] year XEQ "DOY" If you prefer month, day, year instead simply insert an X<>Y command between line 08 and 09. The program automatically checks for leap years, this works for all dates between 1 January 1901 and 28 February 2100. Example: 1 [ENTER] 10 [ENTER] 1999 XEQ"DOY" => 274 1 [ENTER] 10 [ENTER] 2000 XEQ"DOY" => 275 Dieter |
|||
« 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)