MDATE(1)

NAME
mdate - a command-line mayan date utility

SYNOPSIS
mdate , mdate [OPTIONS]... [+FORMAT]

DESCRIPTION
mdate with no arguments prints the Mayan Calendar date for today.

OPTIONS

mdate
    Returns the current Mayan Calendar date for today in default format.

-p, --parseable
    Returns the current Mayan Calendar date in program-parseable format. Silently ignored on versions above 1.4.5 unless configured. Kept for backwards compatibility otherwise.

-g, --gmt
    Returns the current Mayan Calendar date using the GMT correlation. Since Mdate 1.6.0, this option is silently ignored, as gmt is now the default correlation.

-L, --lang[=LANGUAGE]
    switches language support. By default this is English, but may vary. See mdate's help for current language support.

-c, --correlation[=DOUBLE]
    Enter a correlation different from the default. This is a Julian Day Number representing the beginning of the Mayan Calendar according to different authorities. See the -j, --julian option below. The default correlation used by mdate is the Lounsbury correlation (JDN 584285.0) , which may have its critics, but has impressive evidence to back it up.

-d, --dmy[="dd mm [-]yyyy"]
    Enter a day month year in the form dd mm [-]yyyy Gets the Mayan date for the date specified. The year may be negative for BC dates. Gregorian dates are always returned.

-j, --julian[=DOUBLE]
    Enter a number with or without a decimal point eg

    mdate -j 584285.0, --julian=584285.0

    Gets the Mayan date on a specified Julian Date.

    mdate -j 584285, --julian=584285

    gets the same result.

-l, --longcount[="00 00 00 00 00"]
    Enter a Mayan Long Count in the form baktun katun tun kin uinal using leading zeros where necessary.

    mdate -l "12 19 07 08 00"

    gets the Gregorian Date on a specified Long Count.

-L --lang=LANGUAGE
    Use a language different than the compile-time default.

-h, --help
    Displays the version and help for mdate Check this for date format options and current language support.

-v, -V, --version
    Displays the version of mdate and exits.

Options may be combined in any order, but certain options, such as -g and -c will give an error (since you can only specify one correlation at once).

FORMAT controls the output for current dates only. The list of available formats are:

@a  abbreviated weekday name. This only works for the current date, not past or future dates.

@A  full weekday name. This only works for the current date, not past or future dates.

@b  abbreviated month name

@B  full month name

@C  century as 2 digits

@d  weekday (01..31)

@e  weekday without a leading zero

@F  ISO format Gregorian date (%Y-%m-%d)

@f  ISO format Gregorian date (%Y%m%d)

@h  unpadded Haab date

@H  padded Haab date

@l  Long Count

@M  named Gregorian month

@m  numbered Gregorian month

@t  padded Tzolkin date

@T  unpadded Tzolkin date

@y  year as decimal 00 to 99

@Y  Gregorian year

@n  add a newline to the output

@j  add a tab to the output

EXAMPLES

To get today's date

    mdate

To get today's date using the day month year arguments

    mdate -d "24 03 1999"

To get the current Mayan Long Count using today's Julian Day Number

    mdate -j 2451215.0

To get today's date using the current Mayan Long Count

    mdate -l "12 19 05 16 12" or mdate --longcount="12 19 05 16 12"

To get today's date using a simple format which outputs the ISO year and Long Count

    mdate '+@f @l'

To get a specific date using the same format:

    mdate -d '10 09 2003' '+@f @l'

Dates specified in this way will only be formatted according to program-parseable output. The use of -p in this context will force padded output for some fields, and isn't strictly necessary.

LICENSE
Mdate is licensed under the terms of the GNU General Public License version 2. Where applicable, public domain algorithms and derivative works from other GPL sources are duly acknowleged where they occur in code.

NOTES
mdate 's command-line output is simplified to a one-liner for easier parsing by other programs well as future output interfaces.

DIAGNOSTICS
mdate does not accept dates beyond the beginning of the current epoch, consistent with the Julian Day Number correlation. Invalid input of dates, JDN's or Long Counts causes mdate to exit with an error message indicating (I hope) the source of the problem.

BUGS
An awful lot probably. There is at least one correlation I cannot use.

The field of mayan calendars, in fact, is strewn with pitfalls, and there are many other applications of mayan calendars i could add to the program if i wished, but the current purposes i feel are hairy enough to start with.

SEE ALSO
Please refer to the accompanying documentation in the distribution source directory (available in several formats, depending on your tools) or in /usr/local/share/doc/mdate if that exists.

mdate
    can be downloaded from

    http://mdate.sourceforge.net/

FILES
Mdate doesn't require any specific files.

AUTHOR
Sean Dwyer <ewe2@users.sourceforge.net>