HP Forums
(10C) Day of the Week - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (10C) Day of the Week (/thread-16458.html)



(10C) Day of the Week - Gamo - 03-12-2021 05:14 AM

Since the poor HP-10C never have a Solutions Handbook like HP-11C or
ohters like HP's Applications Book.

I'm imprementing a bit from HP-25 Applications Book on page 49

Title "Calendar, Day of the Week, Days betweenn Two Dates"

----------------------------------------
Steps:

1. Compute N(m,d,y)

[f] [PRGM]

Month [STO] 1
Day [STO] 2
Year [STO] 3

[R/S] Display N

2. Compute Day of the week (0 = Sunday) [R/S]

3. For number of days store first N from Step 1 and [STO] 7

4. Repeat steps 1 then [RCL] 7 [-] display number of days
-----------------------------------------
Program:
Code:

01  3
02 RCL 1
03 X≤Y
04 GTO 09
05  1
06  +
07 RCL 3
08 GTO 15
09  1
10  3
11  +
12 RCL 3
13  1
14  -
15  3
16  6
17  5
18  .  // decimal point
19  2
20  5
21  x
22 INT
23 X<>Y
24  3
25  0
26  .  // decimal point
27  6
28  x
29  INT
30  +
31  RCL 2
32  +
33  6
34  2
35  1
36  0
37  4
38  9
39  -  
40 R/S
41  7
42  ÷
43 FRAC
44  7
45  x
46 GTO 00

Example:

What day of the week is March 31, 2021 and

How many days to December 1, 2021

[f] [PRGM]

3 [STO] 1
31 [STO] 2
2021 [STO] 3

[R/S] display 117274 [ST0] 7 [R/S] 3 // Wednesday

Remark: If no need to find number of days don't have to do [STO] 7

Number of days:

12 [STO] 1
1 [STO] 2
Remark: If same year no need to store again to [STO] 3
[R/S] display 117519
[RCL] 7 [-] display 245 // answer 245 days

To check answer using the HP-12C

M.DY mode

3.312021 [ENTER] 0 [DATE] display 3,31,2021 "3"

Previous result on display enter 12.012021 [△DYS] display "245"


Gamo 3/2021