Mdate is a utility that converts Gregorian dates to Mayan Long Count dates. It was originally an implementation of some algorithms published by N. Dershowitz and E.M. Reingold in their book Calendrical Calculations.