If you are a Vampire or a Werewolf in the World of Darkness then there are certain things you need to know.
For Vampires, the sunrise and sunset times are just very important. Especially if you travel to another city around the world, this information is crucial!
For Werewolves, knowing the phase of the moon can be an essential tool for planning out your coming week.
Well, fear not, WoDalmanac gives you all this. With a few clicks, you can find out exactly when the sun rises or sets at many thousands of locations around the globe. WoDalmanac includes a city database complete with population data. You can even view any of those cities in Google Maps. Just select the date and location, and sunrise and sunset data along with moon phase information is displayed.
Looking for the Source code? Visit the Bitbucket repository!
(source code is for Visual Studio 2012 – you might be able to open it with 2010 as well)
About the geographic database
WoDalmanac uses the GeoNames database to get a list of cities. The solution contains a separate project called CityDBImporter, that reads various databases that you need to download from GeoNames and then imports them into the format WoDalmanac uses. The resulting data is saved as a huge XML file that is then sent through a Deflate stream to make it smaller on disk.
WoDalmanac decompresses the file and loads the data when you start the application.
About the source
The application is a pretty straightforward and pretty simple Windows Forms application written in C#.
About the algorithms
The Sunrise/Sunset algorithm is from the Almanac for Computers, published in 1990 by Nautical Almanac Office. You can find more copyright information in the SunriseSunset.cs file.
I really don’t remember where I got the Moon Phase calculation algorithm from 🙂
WoDAlmanac uses the GPL v3 licence.
(the earliest version of the source do not reference the GPL v3 license, but nevertheless the entire source and history thereof is licensed under GPL v3)