Post Reply 
(41CX/DM41)(17Bii) Date of the first Advent Sunday in a year
01-22-2021, 01:27 PM
Post: #4
RE: (41CX/DM41)(17Bii) Date of the first Advent Sunday in a year
(08-10-2020 03:02 PM)ggauny@live.fr Wrote:  Hi,

I see your thread a little late but here is a little routine of mine I was using with my
HP 41c (+ time module) or my HP 41cx.

Instead of DDays I'm using DOW, but unfortunatly DOW gives 0 if the day is a sunday, (HP Prime gives 7). So we have to "adjust" in case of DOW gives a 0.

Code:

01 LBL "DIMAVENT'
02 7                        //Here is the adjust.
03 x<>y
04 1e6
05 /
06 25.12
07 +
08 ENTER
09 DOW
10 x=0?
11 x<> Z                 // or RCL+ ST Z on HP 42s, FREE42, DM42
12 21
13 +
14 CHS
15 DATE+
16 END

Of course runing on dm41, dm41x too and some other calculator.

2016 gives 27.112016 for example, 1582 gives 28.111582

For HP Prime:
DATEADD((IP(Date)+.1225),-(21+DAYOFWEEK(IP(Date)+0.1225))) for actual year

SHIFT Define <function> for user defined function

HP 33C 34C 11C 41CX 12C 15C HP71B 35s 50g Prime Rev. A, C, D. DM 41X, 42. TI 58C, 59, 74, 92-II, Voyage 200, nspire CX II-T, Sanyo ICC 82D and more
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (41CX/DM41)(17Bii) Date of the first Advent Sunday in a year - Wolfgang - 01-22-2021 01:27 PM



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