nerdnology.com — How to find out how many leap years are between a start date and end date using C#, written in ASP.NET 2.0. This is useful for insurance premium calculations where your math is based on a 365 day calendar and having a 366 day year due to leap year will throw off premiums.