First was the "Calendar Round", they had two non-synchronous "yearly" calendar of 365 days (Haab') and 260 days (Tzolk'in), giving a date in both calendars provided an exact identification in a repeating cycle (era) of 18980 days (~52 solar years).
Second was the "long count", a monotonically increasing calendar from a root date (think CE/BCE, except including days). A "long count" date is composed of a number of counters mostly in base 20: K'in (day), Winal (20 K'in), Tun (18 Winal), K'atun (20 Tun), B'ak'atun (20 K'atun) (dates have been found with even higher orders, but they're rare, those are the most common). A B'ak'atun unit represents ~394 solar years. This provides an unambiguous and very long term calendar. It's essentially what the UNIX system does, except starting from days (interestingly, a standard 5-units long count fits in just 22 bits, 31 bits [to account for signing] allows for 5.8 million years before wrap-around)