From: Jim Weigang <jimw@chilton.com> Newsgroups: comp.lang.apl Date: Wed, 22 Apr 1998 12:05:01 -0400 Subject: Re: Sunshine At The Cygnets In Our Waters On April 21, Tomas Gustafsson wrote: > Someone who knows how to calculate the time of sunrise and sunset, based on > date and location? I've had the following program in my INI0 workspace for I don't know how long, where it displays the times of sunrise and sunset (and moonrise and moonset, along with a little 1-D ASCII plot of these events) every time I start APL. I made no effort to APLify this program or even understand the algorithm when converting it from Basic, so it's not showcase APL code, but it works. For other astronomical programs, see Sky & Telescope's website, at http://www.skypub.com. (A good place to visit the next time the media tells you the sky is falling!)(This program is just too big and ugly to bother reproducing in its entireity as a graphic image. The full source code is in the hidden APLASCII comment, so you can extract it if you'd like to use the program.) At startup, I display a line like the following: Sunrise is at 5:59 today, sunset at 7:40. (13.7 hours of sunlight.) The code that does this is: Jim(Again, the full source code is in the hidden APLASCII comment.) JimNote: The APL code on this page can be extracted without you having to retype it. See "Downloading Code" for instructions. JimW's Home Page |