Long before Europeans had devised a leap day, Mayans knew that a year was longer than 365 days.
The Mayans devised a calendar that accounted for the longer-than-365-day year. They had highly advanced knowledge of the earths rotational period around the sun as well as knowledge about other celestial bodies at a time when most Europeans still believed that the sun rotated the earth.