An animated loader.
Forked from Matt Smith's Pen Newton's Cradle Loader.
A Pen by Captain Anonymous on CodePen.
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| import operator | |
| def dayOfYear(year, month, day): | |
| # we suppose input is always correct | |
| if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0): | |
| monthDays = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] | |
| else: |
An animated loader.
Forked from Matt Smith's Pen Newton's Cradle Loader.
A Pen by Captain Anonymous on CodePen.