At a more coarse-grained level, "Calendrical Calculations" by Dershowitz and Reingold is very interesting. It describes many different world and historical calendar systems, and includes lisp code to convert between them.
Among many other problems, converting between calendar systems requires that you define when a day starts; there are many ways to define that among the systems.
I think I have the latest, the third edition, https://en.wikipedia.org/wiki/Special:BookSources/9780521885...