Post Reply 
Number of Days After January 1
03-11-2019, 08:30 PM
Post: #3
Number of Days After March 1st
(03-11-2019 02:25 AM)Eddie W. Shore Wrote:  The program DATENO calculates the number of days from January 1.

Somewhat related is the following program from the article Sunrise and Sunset.

Here it is adapted for the HP-42S:
Code:
00 { 30-Byte Prgm }
01 IP
02 12
03 LASTX
04 FP
05 100
06 ×
07 3
08 -
09 X<0?
10 +
11 30.6
12 ×
13 0.5
14 +
15 IP
16 R↑
17 +
18 END

Examples:

1.03 R/S
1

28.02 R/S
365

29.02 R/S
366


This avoids having to deal with leap years.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Number of Days After March 1st - Thomas Klemm - 03-11-2019 08:30 PM



User(s) browsing this thread: 1 Guest(s)