I have no stamina after 14h work day to produce a MWE for you but I will give you little push. You are dealing here with two separate problems.
- First problem is ephemeris astronomy problem. You want to write a peace of code which will generate calendar.
- The second problem is a typographic problem. You want to use high quality typesetting system (for example TeX) to create nicely printed document from automatically generated text output from the above.
While doing computations (creating calendar is really very elementary ephemeris astronomy problem) is certainly possible in Turing complete language like TeX it is rather impractical. For starters TeX doesn't do floating point arithmetics so as a first step you will have to implement floating point arithmetics in TeX using signed fixed point arithmetics of TeX (Yes I know there is a LaTeX package that somebody already wrote to do this but it is silly). So how do you solve first problem. Well you can use for example Python (Perl, Ruby, Lua etc…) to generate calendar. Output should be of course plain text aka. ASCII code because that is universal interface.
Then you could use Python (Perl, Ruby, Lua etc...) to automatically generate LaTeX code from above plain text output (you really need to wrap up test output with LaTeX code). Finally you want to tex such a file and get printable output. You can even write a Make file which will automatize above steps for you.
To make things really simple I would suggest you familiarize yourself with PythonTeX of LuaTeX which are ideally suited to solve above problem.