Some, like our Gregorian calendar, are based on the year, some are based on the lunar cycle, and some are entirely artificial. Without an ethnic calendar, ethnicity is hard to maintain. All you have is food or something. Reingold pointed out that in a relatively small area like southeast Asia there are over 100 calendars. That is, the date depends on the sunrise in that particular location and where the moon was at sunrise.
Calendrical problems are notorious for plaguing software.
Excel has the same flaw. The algorithmic nature of calendars and how to do the computations are the focus of the book, although some of the history and astronomical connections are talked about because of their interesting nature. The initial motivation for what was to become Reingold's calendrical quest was to create Emacs-Lisp code that would provide calendar features for GNU Emacs, which would include the Gregorian, Islamic, and Hebrew calendars. Then it grew from there. That is, it goes into a quiescent state for a while, but then all of a sudden it'll erupt, and you'll be bothered with fever and aches and pains.