Tides make the Earth slightly asymmetrical, and one result is that the Earth's rotational energy is slowly being stolen by the Moon. This was worked out mathematically in the 1800's. Today, however, it has been measured. One consequence is that in the future, there will be fewer days in a year. And in the past, there would have been more.
Modern corals deposit a single, very thin layer of lime once a day.
You can also count annual growth. So, given the right piece of coral, you can measure how many days there are in a year. These measures can equally well be done on fossilized coral. For example, coral from the Pennsylvanian rockbeds have about 387 daily layers per year. Coral from the Devonian rockbeds have about 400 daily layers per year.