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
|
683 Discussions
|
Please Login in order to post a comment
arr = input().split()
month = int(arr[0]) date = int(arr[1]) year = int(arr[2])
weeddayidx = calendar.weekday(year, month, date) print(calendar.day_name[weeddayidx].upper())
This Python calendar module is so handy! I used it to build a script that finds weekdays for dates—super useful for planning. Recently, I needed to check Norwegian holidays for a project and discovered the norskukekalender *with week numbers and anniversaries pre-marked. Now I’m tweaking this code to auto-highlight Norway’s Constitution Day (May 17th!). Fun how a simple task leads to real-world tools!
Here is HackerRank Calendar Module in python solution - https://programmingoneonone.com/hackerrank-calendar-module-problem-solution-in-python.html