Sort by

recency

|

683 Discussions

|

  • + 0 comments

    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())

  • + 0 comments
    # I googled calendar module and found the .weekday() method. The rest of the solution is easy.
    import calendar
    
    month, day, year = input().split()
    weekday = calendar.weekday(int(year), int(month), int(day))
    week = ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]
    print(week[weekday])
    
  • + 0 comments

    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!

  • + 0 comments
    import calendar
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    r = list(map(int, input().split()))
    print(calendar.day_name[calendar.weekday(r[2], r[0], r[1])].upper())
    
  • + 0 comments

    Here is HackerRank Calendar Module in python solution - https://programmingoneonone.com/hackerrank-calendar-module-problem-solution-in-python.html