stamp in the format YYYY-MM-DD (Gregorian calendar).
Return which day of its year it is: 1 January is day 1, 2 January is day 2, and so on.
As a reminder, a year is a leap year if it is divisible by 4 but not by 100, or if it is divisible by 400. February has 29 days in a leap year.stamp='2016-03-01' → 61
January has 31 days, February 2016 has 29 (a leap year), plus 1 day of March: 61.
stamp='1900-12-31' → 365
1900 is divisible by 100 but not by 400, so it is not a leap year and has 365 days.
stamp='2016-03-01'
61
Run checks the first 3 tests in your browser. Submit checks all 101 tests on the server, hidden ones included.