The earth spins, the sun rises and sets, we have day and night. Each rotation cycle takes roughly 24 hours. But that hasn’t always been the case—and eventually, it will change again.

It takes the earth roughly 365 days and six hours to orbit the sun. If we didn’t have Leap Day on February 29 every four years to offset those extra hours, the calendar would slowly creep out of sync with the seasons. But our practice of adding an occasional extra day to our calendar won’t work forever—as it turns out, the earth’s rotation is slowing down over time. Days used to be much shorter. Hundreds of millions of years ago, the earth rotated 420 times around its axis in the time it took it to orbit the sun, rather than 365 and change. And fossilized corals from 430 million years ago can help prove it.

Corals, like tree trunks, bear records of growth periods—microscopically thin scars showing when the corals were growing rapidly and when they weren’t. The lines can help us differentiate between the busy growing seasons from year to year, and even from day to day.

“When a coral is growing, every day it puts down a fine layer of calcium carbonate,” said Paul Mayer, the fossil invertebrates collections manager at the Field Museum in Chicago. “Every day, there’s a deposit, and you can see how they stack up into monthly deposits linked to the lunar cycle.”