FWIW, two existing way to do that that are already in Debian are the packages remind and libdatetime-astro-sunrise-perl. Use of the perl module is pretty obvious; use of remind is too ugly to show here. :)
A standalone tool is nice, but there would be something to be said for using an existing library to avoid reinventing this rather complex and subtle wheel. -- see shy jo
signature.asc
Description: Digital signature