I have written a program that should find the days between two dates, but it has some hiccups. The logic makes perfect sense in my head when I read through it, so
This is not a complete answer. I just wanted to mention a better way to calculate leap year (this is taken from The C Programming Language - Page #41)
The C Programming Language
if ((year % 4 == 0 && year % 100 != 0) || year % 400 ==0) printf("%d is a leap year \n", year); else printf("%d is not a leap year \n", year);