You are viewing a single comment's thread. Return to all comments →
python 3
def julian_year(year): if year % 4 == 0: return f"12.09.{year}" else: return f"13.09.{year}" def transition_year(): return "26.09.1918" def gregorian_year(year): if year % 400 == 0: return f"12.09.{year}" elif year % 100 == 0: return f"13.09.{year}" elif year % 4 == 0: return f"12.09.{year}" else: return f"13.09.{year}" def dayOfProgrammer(year): if 1700 <= year <= 1917: return julian_year(year) elif year == 1918: return transition_year() elif 1919 <= year <= 2700: return gregorian_year(year)
Seems like cookies are disabled on this browser, please enable them to open this website
Day of the Programmer
You are viewing a single comment's thread. Return to all comments →
python 3