Apple interview question

Difference between two dates from scratch with leap year edge cases