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.”

“You can see seasonality, where the corals grow more in the dry season than in the wet season,” he explained. “If you count up all the little lines between seasonalities, you get the number of days in the year.”

And those days per year are different depending on when the corals lived. Corals from the Silurian Period, 444-419 million years ago, show 420 little lines between seasonality bands, indicating that a year during that period was 420 days long. More recent corals from the Devonian Period, a few million years later, show that the earth’s spin had slowed down to 410 days per year.

So why is the Earth slowing down in the first place? It has to do with the earth’s relationship to the moon. “The moon used to be closer to us than it is now,” Mayer said. “In the Silurian Period, the full moon would have looked a lot bigger on the horizon.” When the Earth rotates, gravity pulls a bulge of ocean water toward the moon. That slow, sloshing water slows down the planet’s spin by a tiny bit. And when the Earth slows, its rotational energy is transferred to the moon, causing the moon to move faster and pull away from the earth, centimeter by centimeter. And over the course of millions of years, these infinitesimal adjustments to the earth’s rotation and the moon’s distance add up, eventually changing the day and night that our planet experiences.

“Who’d have thunk that a fossil coral could tell you that your calendars change over geologic time?” mused Mayer. “That’s one reason we collect these things at the Field. They show us how our planet changes”—in tiny, tiny differences that don’t matter until they do.