I always enjoyed doing these back on /prog/. Here's the deal:
Dokyun Calendar
Input: one non-negative integer, corresponding to a certain number of days after September 1st, 1993 (inclusive).
Output: three non-negative integers, corresponding to the day, month, and year, in the calendar of your choice.
Rules
There are no damn rules, just make something cool!
Addendum: don't forget leap years.
Reward
The best submission, as determined by the hive mind, wins ten (10) Internet Cool Guy Points.
Nice idea, but it feels almost wrong to have something like that. It breaks the magic, if you will. Something that goes the other way (takes a date in some format and outputs the September 1993 date) seems like a better idea.
from datetime import date
from datetime import timedelta
def norm2dqn(year, month, day):
dqnday = date(1993, 8, 31)
norm = date(year, month, day)
return (norm - dqnday).days
def dqn2norm(day):
dqnday = date(1993, 8, 31)
norm = dqnday + timedelta(days=day)
return norm
print(norm2dqn(2021, 6, 9))
print(dqn2norm(10123))
>>4
Glad to see everyone likes my entry.
Do I win?
>>5 submissions remain open until 1994