home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / remind-03.00.19.tgz / remind-03.00.19.tar / remind-03.00.19 / www / sunrise.rem-DIST < prev    next >
Text File  |  1997-01-15  |  1KB  |  43 lines

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