Tomás Alonso Albi provides an excellent ephemerides (in Java) for calculation of Sun and Moon information, on his blog.
The same is also used by Deesha.
Building on the above, Sun Moon is a graphical application. It provides various useful information for both Sun and Moon, including a graphical depiction of the Moon.
Required date/time and location (Geodetic: longitude/
The Sun/Moon times can be shown either in the user Time Zone or in UTC (Universal Coordinated Time).
Download JAR file: Sun Moon Info.
Hash of the JAR file (sun-moon-info.jar): MD5 : 7f0612e465d5fceefcb62496fb8dec30 SHA-1: 7f9ed453ae3ba0616af37d7daf6186dc0b4a89f6
Download Java Source (in ZIP archive): Sun Moon Info.
Hash of the ZIP file (sun-moon-info.zip): MD5 : b5bbbd7f3a570f4a1b3e6f791c45cb19 SHA-1: 2c99016917969f34e43397375f352c273602808b
Note: You need to have Java Runtime Environment installed for your platform.▲