Post Reply 
Wp34s date from DOY
11-03-2015, 05:37 PM
Post: #1
Wp34s date from DOY
Hi,

We all know how calculate a "Day of year" say also "YearDay".
A beautifull little routine stays in the WP34s Library for this.
But reverse is it possible, say I know the DOY and, of course, the year of this day of year ?

Yes it is possible with that little routine adapted from A POUPLIER in Jean MEEUS.

Code:


LBL'DYD'  ; stand for the Date from a Year Day
#002
STO I
X<>Z
LEAP?
DEC I
[<=>] YZXX ; to fit the convenient stack
#032
X>? Y
SF 00
DROP
RCL I
X<>Z
DROP
+
RCL L
X<>Y
#009
x        ; Multiplicate
2
7
5
/
#098
SDR 002
+
IP
FS?C 00
RCL/ X
STO 00
2
7
5
x        ; Multiplicate
9
/
IP
-
RCL 00
9
+
#012
/
IP
RCL I
x         ; Multiplicate
+
#030
+
RCL 00
SDR 002
+
X<>Y
SDR 006
+
RTN
END

Enter first YEAR and second DOY !

So, 1908 297 ----> 23,101908 my Father born
1914 169 ----> 18,061914 my Mother born
1907 90 ----> 31,031907
1908 91 ----> 31,031908

Gérard.
:Wink

Gérard.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Wp34s date from DOY - ggauny@live.fr - 11-03-2015 05:37 PM
RE: Wp34s date from DOY - fhub - 11-03-2015, 06:15 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 07:40 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 07:47 PM
RE: Wp34s date from DOY - Dieter - 11-03-2015, 08:05 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 08:21 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 08:22 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 08:29 PM
RE: Wp34s date from DOY - Dieter - 11-03-2015, 08:33 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-03-2015, 08:51 PM
RE: Wp34s date from DOY - ggauny@live.fr - 11-04-2015, 12:16 PM
RE: Wp34s date from DOY - fhub - 11-04-2015, 04:33 PM
RE: Wp34s date from DOY - Dieter - 11-05-2015, 01:30 PM
RE: Wp34s date from DOY - fhub - 11-05-2015, 02:55 PM



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