1# File for giving sunrise info 2# 3# This file is part of REMIND. 4# Copyright (C) 1992-2018 by Dianne Skoll 5 6set now now() 7 8banner % 9MSG <HEAD>% 10MSG <TITLE>Sunrise in [$Location]</TITLE>% 11MSG </HEAD>% 12 13MSG <BODY> 14MSG <H1>Sunrise in [$Location]</H1> 15 16set tod sunrise(today()) 17set tom sunrise(today()+1) 18 19set len1 sunset(today())-sunrise(today()) 20set len2 sunset(today()+1)-sunrise(today()+1) 21set dlen len2-len1 22set slen iif(dlen==0, "the same length as", dlen<0, abs(dlen)+plural(abs(dlen)," minute", " minutes")+" shorter than", dlen+plural(dlen, " minute", " minutes")+" longer than") 23 24set diff tod-now 25set adiff abs(diff) 26set hdiff adiff/60 27set mdiff adiff%60 28 29set mstr iif(mdiff==0, "", mdiff == 1, "1 minute", mdiff + " minutes") 30set hstr iif(hdiff==0, "", hdiff == 1, "1 hour", hdiff + " hours") 31set astr iif(mdiff!=0 && hdiff!=0, " and ", "") 32set fn iif(diff==0, "now", diff <0, "ago", "from now") 33set iw iif(diff<0, "was", "is") 34set aw iif(tod==tom, " as well.", ".") 35msg Today is %w, %d %m, %y.<P> 36msg The local time in [$Location] is [now].<P> 37msg Sunrise today [iw] at [tod]; in other words, [hstr][astr][mstr] [fn].<P> 38msg Sunrise tomorrow is at [tom][aw]<P> 39msg The daylight portion of tomorrow will be [slen] today.<P> 40msg </BODY> 41