Post Reply 
[Free42] Minichallenge: ->DATE
08-13-2020, 06:54 PM
Post: #2
RE: [Free42] Minichallenge: ->DATE
My solution, with YYYY in Z, MM in Y and DD in X, it returns the date in the current format:

Code:
00 { 31-Byte Prgm }
01▸LBL "→DATE"
02 FS? 31
03 X<>Y
04 FC? 67
05 RCL ST Z
06 100
07 FC? 67
08 STO÷ ST Y
09 STO÷ ST Y
10 STO÷ ST Z
11 ÷
12 +
13 +
14 END

And the reverse routine:

Code:
00 { 37-Byte Prgm }
01▸LBL "DATE→"
02 IP
03 LASTX
04 FP
05 100
06 ×
07 IP
08 LASTX
09 FP
10 100
11 FC? 67
12 STO× ST Y
13 ×
14 STO ST T
15 FC? 67
16 R↓
17 FS? 31
18 X<>Y
19 END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[Free42] Minichallenge: ->DATE - Werner - 08-13-2020, 08:23 AM
RE: [Free42] Minichallenge: ->DATE - Didier Lachieze - 08-13-2020 06:54 PM



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