Welcome to the Community!
It’s how the objects of the
datetime.timedelta class work. You can read more about it in this mission.
When we instantiate a timedelta class directly (i.e. create a
datetime.timedelta object), we can assign it any of the following parameters, according to the syntax:
datetime.timedelta(days=0, seconds=0, microseconds=0,
milliseconds=0, minutes=0, hours=0,
When then we print the resulting object, it will be rendered automatically in days (if applicable), hours, minutes, and seconds. For example:
ten_seconds = dt.timedelta(seconds=10)
one_hour = dt.timedelta(seconds=3600)
one_more_hour = dt.timedelta(minutes=30, seconds=1800)
more_than_one_day = dt.timedelta(hours=22, minutes = 180, seconds=20000)
1 day, 6:33:20
However, if we assign the parameters so that to have more than one week, it will still be rendered in days, and not weeks:
two_weeks = dt.timedelta(days=13, hours=24)
14 days, 0:00:00
Returning to your mission screen, both
min_length are the objects of
datetime.timedelta type. In the dictionary
appt_lengths they were assigned in seconds, now they are rendered in days (in case of
max_length), hours, minutes, and seconds.