2022-11-13 10:39:28 -08:00

6 lines
153 B
Python

>>> def dayname(time):
... """Return the name of the day of the week for the given time."""
... return calendar.day_name[time.weekday()]
...
>>>