Post Reply 
(34S) - Sunrise/Sunset
02-11-2015, 03:06 PM (This post was last modified: 02-11-2015 03:09 PM by Dieter.)
Post: #7
RE: WP 34S - Sunrise/Sunset
(02-11-2015 07:48 AM)Thomas_Sch Wrote:  could you please post your modified version of the program?

Im am still working on it. My curent version also takes care of daylight savings time. Since 1996 the European Union switches to DST on last Sunday in March and back to standard time on last Sunday in October (both at 1:00 UTC). The following subroutine sets flag A (so that the "=" announciator comes on) if a date falls in the DST period.

Code:
LBL"DST"
STO 00    // or any other unused register
YEAR
FILL
#011
XEQ 01
x<>Y
#004
XEQ 01
RCL 00
D→J
SF A      // set DST flag
x≥? Y     // IF date < first DST day 
x≥? Z     // OR date ≥ first standard time day
CF A      // THEN clear DST flag
RTN

LBL 01
#001
→DATE     // = 1 April resp. November
D→J
#007
IDIV
RCLx L    // Monday on or before 1 April resp. November
DEC X     // last Sunday of March resp. October
RTN

input  X: date (format according to date mode setting)

       Z: first autumn day with standard time (JDN)
output Y: first spring day with DST (JDN)
       X: date (JDN)

       Flag A set: DST
       Flag A clr: standard time

I may post my version of Jeff's program, but not without his permission. So Jeff, is this OK for you?

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


Messages In This Thread
(34S) - Sunrise/Sunset - Jeff O. - 01-28-2015, 08:08 PM
RE: WP 34S - Sunrise/Sunset - Kiwi Geoff - 02-09-2015, 10:06 AM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-11-2015, 03:22 AM
RE: WP 34S - Sunrise/Sunset - Paul Dale - 02-09-2015, 09:13 PM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-10-2015, 10:31 PM
RE: WP 34S - Sunrise/Sunset - Thomas_Sch - 02-11-2015, 07:48 AM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-11-2015 03:06 PM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-11-2015, 05:49 PM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-11-2015, 09:46 PM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-11-2015, 08:03 PM
RE: WP 34S - Sunrise/Sunset - Paul Dale - 02-11-2015, 09:06 PM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-13-2015, 12:19 AM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-13-2015, 06:52 AM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-13-2015, 02:19 PM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-13-2015, 08:01 PM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-15-2015, 07:57 PM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-15-2015, 08:31 PM
RE: WP 34S - Sunrise/Sunset - Kiwi Geoff - 02-22-2015, 11:48 AM
RE: WP 34S - Sunrise/Sunset - Thomas_Sch - 02-11-2015, 06:09 PM
RE: WP 34S - Sunrise/Sunset - Kiwi Geoff - 02-21-2015, 02:17 AM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-21-2015, 07:05 AM



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