Skip to content

Instantly share code, notes, and snippets.

@shounaklohokare
Created December 28, 2020 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shounaklohokare/e23ce29e360691498720d0d16b85486b to your computer and use it in GitHub Desktop.
Save shounaklohokare/e23ce29e360691498720d0d16b85486b to your computer and use it in GitHub Desktop.
def dayOfProgrammer(year):
if year < 1700 or year > 2700:
return
elif year==1918:
return '26.09.1918'
elif year < 1918:
if year%4==0:
return '12.09.'+str(year)
else:
return '13.09.'+str(year)
elif year > 1918:
if year%400==0 or year%4==0 and year%100!=0:
return '12.09.'+str(year)
else:
return '13.09.'+str(year)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment