We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Date and Time
- Calendar Module
- Discussions
Calendar Module
Calendar Module
Sort by
recency
|
667 Discussions
|
Please Login in order to post a comment
Could someone explain why the firstweekday is 6 in the sample code?
import calendar m,d,y=input().split(" ") print(calendar.day_name[calendar.weekday(int(y),int(m),int(d))].upper())
import datetime import calendar
m, d, y = map(int, input().split()) input_date = datetime.date(y, m, d) print(calendar.day_name[input_date.weekday()].upper())