The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(11C) Calendar Routines
01-04-2020, 10:30 AM
Post: #1
(11C) Calendar Routines
HP-11C Solutions Handbook doesn't provide the Calendar Routines.

Found that HP-55 Mathematic programs got the "Calendar Routines" program so
I adapted this program to work for HP-11C

For those who have HP-55 Mathematic Program book this routine is on page 75

As stated in this book:

This program called March 1, 1700, day 1 and gives every succeeding day a
corresponding number. The program works for days to and including February 28, 2100.
However, for days from
March 1, 1700, to Febuary 28, 1800, 2 days must be added to tha answer and for days from
March 1, 1800, to February 18, 1900, 1 day must be added.
------------------------------------------------------------------
Procedure: [USER] [FIX] 0

[A] Month // 1 for January
[B] Day // 1 to 31
[C] Year // 2020
[D] Day of the Week // 0 = Sunday
[E] Days Between Two Dates // 1st Date start Label [D] 2nd Date [E]
------------------------------------------------------------------
Example:
What day of the week for 1/4/2020

1 [A] display 1
4 [B] display 4
2020 [C] display 2020

[D] display 6 // Answer is Saturday
----------------------------------------
Dates from previous problem how many days to 1/31/2020

Month and Year is the same only change the day to 31

31 [B] display 31

[E] display 27 // Answer: 27 days
---------------------------------------
Program:
Code:

LBL A  // Month
STO 1
RTN
---------
LBL B  // Day
STO 2
RTN
---------
LBL C  // Year
STO 3
RTN
---------------
LBL D // Day of the Week
GSB 0
STO 4
7
÷
ENTER
INT
-
7
x
RTN
--------------
LBL E // Days between Two Dates
GSB 0
RCL 4
-
RTN
--------------
LBL 0 // Calendar Routines
2
RCL 1
X≤Y
GTO 1
1
+
RCL 3
GTO 2
-------------
LBL 1
13
+
RCL 3
1
-
-------------
LBL 2
365.25
x
ENTER
INT
X<>Y
Rv
X<>Y
30.6
x
ENTER
INT
X<>Y
Rv
+
RCL 2
+
621049
-
RTN

Gamo 1/4/2020
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Calendar Routines - Gamo - 01-04-2020 10:30 AM
RE: (11C) Calendar Routines - Gamo - 05-25-2021, 11:27 AM



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