Post Reply 
(42S) Julian Date
07-07-2017, 04:32 AM
Post: #1
(42S) Julian Date
HP 42S Julian Date

Given month, day, year, and university time (Greenwich), the Julian date is calculated. For January 1, 2000 at 12:00 AM, the date is 2,451,545.5.
Code:

00 {141-Byte Prgm}
01 LBL “JULDATE”
02 “MONTH”
03 PROMPT
04 STO 01
05 “DAY”
06 PROMPT
07 STO 02
08 “4 DIGIT YEAR”
09 PROMPT
10 STO 03
11 “UT TIME”
12 PROMPT
13 STO 04
14 367
15 RCL* 03
16 STO 00
17 9
18 RCL+ 01
19 12
20 ÷ 
21 IP
22 RCL+ 03
23 4
24 ÷ 
25 7
26 *
27 IP
28 STO -00
29 RCL 01
30 9
31 –
32 7
33 ÷ 
34 RCL+ 03
35 100
36 ÷ 
37 IP
38 3
39 *
40 4
41 ÷ 
42 IP
43 STO- 00
44 275
45 RCL* 01
46 9
47 ÷ 
48 IP
49 STO+ 00
50 RCL 02
51 STO+ 00
52 1721028.5
53 STO+ 00
54 RCL 04
55 24
56 ÷ 
57 STO+ 00
58 RCL 00
59 END

Example:
Input: May 8, 2017, 03:00 UT. Result: 2457881.6250
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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