Post Reply 
Back on Forum
03-12-2016, 12:30 PM
Post: #15
RE: Back on Forum
(03-09-2016 09:14 PM)Dieter Wrote:  Here is a version that should come close to what you had in mind:

And finally here are two versions that will work both with 4 and 8 stack levels. Here the fifth level was saved by checking if the 9th of a month is a Monday.

This version uses the d.my date format:

Code:
LBL A
D.MY
FP?
YEAR
STO L
CLSTK
RCL L
#012
STO 00
#013
→DATE
LBL 01
#004
+/-
RCL+ Y
WDAY
x≠1?
SKIP 003
DROP
ENTER
SKIP 001
DROP
STO L
DROP
,
0
1
+/-
RCL+ L
DSZ 00
GTO 01
DROP
END

And here is a version for users in the m.dy region. It does not even require a data register.

Code:
LBL B
M.DY
FP?
YEAR
STO L
CLSTK
RCL L
#012
#013
→DATE
LBL 01
#004
+/-
RCL+ Y
WDAY
x≠1?
SKIP 003
DROP
ENTER
SKIP 001
DROP
DEC X
FP
X<> L
x≠? L
GTO 01
DROP
END

Example:
2012 [A] returns all three Friday 13 dates on the stack:

13.072012
13.042012
13.012012

2012 [B] does the same in m.dy format:

7.132012
4.132012
1.132012

Instead of a year also a date within that year can be entered, e.g. it doesn't matter if you enter 2012 or 04.052012.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Back on Forum - ggauny@live.fr - 03-06-2016, 12:43 PM
RE: Back on Forum - Didier Lachieze - 03-06-2016, 02:31 PM
RE: Back on Forum - d b - 03-06-2016, 03:27 PM
RE: Back on Forum - Sylvain Cote - 03-06-2016, 03:46 PM
RE: Back on Forum - Dieter - 03-06-2016, 07:10 PM
RE: Back on Forum - Dwight Sturrock - 03-06-2016, 07:18 PM
RE: Back on Forum - Jlouis - 03-06-2016, 07:40 PM
RE: Back on Forum - rprosperi - 03-06-2016, 09:33 PM
RE: Back on Forum - Etienne Victoria - 03-06-2016, 09:37 PM
RE: Back on Forum - ggauny@live.fr - 03-07-2016, 09:20 AM
RE: Back on Forum - ggauny@live.fr - 03-07-2016, 12:02 PM
RE: Back on Forum - Dieter - 03-07-2016, 12:57 PM
RE: Back on Forum - Thomas Radtke - 03-07-2016, 12:05 PM
RE: Back on Forum - Dieter - 03-09-2016, 09:14 PM
RE: Back on Forum - Dieter - 03-12-2016 12:30 PM



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