Solar Computer provides an easy way to compute sunrise and sunset times, and some other useful values, for any date and geographical location.
This version of Solar Computer is the most recent in a series of programs I have written over the years to provide a variety of useful solar computations. This version is written in JavaScript and replaces an older Java page (archived
here). I replaced the old version because many people have requested a more flexible data source that can produce a table of values covering a year, rather than just one day. Also, over time there have been many changes in Java that had the side effect of preventing older programs from running properly. This is something that should never happen to a computer language, but it does happen, regularly, ultimately disabling any computer programs that are not rewritten over and over again to keep up with arbitrary changes in the language.
The new version is quite easy to use. Detailed documentation is provided
here, but for those who want a quick result, here is how to proceed:
- Enter a geographic position for the location of interest.
- Enter the date of interest if not today.
- Enter a time zone if the automatically generated zone is not correct.
- Compute solar values for the present date.
- Optionally generate a data table for an entire year.
To copy the generated yearly data table, click on the table display, press Ctrl+A (select all), then Ctrl+C (copy). The data table will then be located on the system clipboard, suitable for pasting into a spreadsheet or database file.
Again, complete documentation and technical notes for Solar Computer are located
here.
This is an interesting anecdote about this page and its predecessor — it's not part of the documentation per se.
When I wrote my first Web Web-based sunrise/sunset computer, without any deep thought I named the page "Sun Computer". That seemed a reasonable name and was in keeping with the widely respected idea that a short name that conveys the essentials is better than a long one.
In the meantime, widespread changes were taking place on the Web, the most important being that people began to find what they sought by way of search engines like Google, rather than visiting what were called "gateway sites," as Yahoo once was.
One day I got an official-looking, registered letter in the conventional mail, that turned out to be from a corporate law office. The letter's tone was unashamedly adversarial, as legal letters tend to be, starting out with something like "Sun Computer must protect its intellectual property and trademarks ...", then going on to argue that my having named my page "Sun Computer" infringed on Sun Computer's trademark.
I very foolishly replied that there was a heavenly body with that name, I had to refer to it by name in order to describe my page, and people who name their companies using common dictionary words are just asking for trouble. Those readers who conclude from this reply that I had not talked very much with lawyers are quite right. On the other hand, I had no idea what was going on, and the lawyers' adversarial stance left no latitude for simple explanations.
After an exchange of letters, during which the lawyers did what they do best (threaten legal action to keep me from misusing the "Sun" name), I finally sorted it out. It turns out that
my "Sun Computer" page appeared above
their "Sun Computer" page in Google's search listings, which needlessly misdirected people to
a sun computer rather than
the Sun Computer.
This confusion was certainly not my intention, and I hadn't named my page with the intention of misdirecting people who wanted
the Sun Computer. This was before people began registering common misspellings of domain names, hoping to take advantage of keyboard mistakes, and nothing was further from my mind.
On my own I figured out what the problem was, and I fixed it in a matter of minutes. I got over my giggles that Sun Computer expected to keep people from using the word "Sun," and I changed my page's name to "Solar Calculator." My point? "Sun Computer" could simply have explained the problem and asked me to change my page's name to something that wouldn't trigger a confusing search engine result. That would have saved a lot of time, trouble and expense for both Sun Computer and me, because I had to figure out on my own what they wanted, and why.
What I found astonishing was the corporate lawyers never considered the possibility that I had no nefarious intent and didn't care very much what my page was called. They could have showed up at my door, borrowed a cup of sugar, and solved the problem in a matter of minutes. On the other hand, if they had done that they wouldn't have been able to charge Sun Computer several thousand dollars in billable legal hours.
And that, boys and girls, is why this page is named "Solar Computer" instead of "Sun Computer," a concise and obvious choice.