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
|
651 Discussions
|
Please Login in order to post a comment
It gives flexibility for regional or personal preferences, which is a nice touch. Overall, it looks like a great module for anyone dealing with dates, schedules, or just needing a quick way to visualize time. https://cricbet99.club
OMG didn't know cal.day_name exists, I wrote the following code
Although it works fine in jupyter notebook, I don't see why it doesn't work withint Hackers environment, does anybody know what the problem is?
althoug
Short and sweet!:
import calendar as cal m, d, y = map(int, input().split()) print(cal.day_name[cal.weekday(y, m, d)].upper())
import calendar
M,D,Y=input().split() year=int(Y) month=int(M) day=int(D) out=calendar.weekday(year,month,day) days=list(calendar.day_name)
print(days[out].upper())