Tuesday, November 9, 2010

Algorithm 199

I'm blogging this just so I don't lose this useful reference to CACM Algorithm 199, a magic set of routines for converting between Gregorian (calendar) and Julian dates. Someday I'd love to read the original article and find out where all the magic numbers come from.


  1. http://pmyers.pcug.org.au/IndexedMultipleYearCalendar/Calgo_199.PDF

  2. Sorry, meant to include this link as well...


  3. Thanks for the links - I finally got to read the original paper! Sadly, it contains no explanations regarding the derivation of the magic numbers.

    It's been a while (since college, in the early '70s) since I've read any Algol.

  4. There's a section at the end of the second link that discusses how KDATE and KDAY work. You can skip the first part, as it is specific to the Unisys MCP job control language.