Skip to content

Instantly share code, notes, and snippets.

@sookcha
Created January 31, 2019 09:59
Show Gist options
  • Save sookcha/47088afd16c9f9cab448f934a7f9fbd9 to your computer and use it in GitHub Desktop.
Save sookcha/47088afd16c9f9cab448f934a7f9fbd9 to your computer and use it in GitHub Desktop.
import calendar
import datetime
from random import randint
today = datetime.date.today()
first_and_last_day = calendar.monthrange(today.year, today.month)
determined_date = randint(first_and_last_day[0], first_and_last_day[1])
print(determined_date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment