Answers for "python calendar show current month"

6

how to get the calendar of current month in python

import calendar
import datetime
month = datetime.date.today().month
year = datetime.date.today().year
print (calendar.month(year,month))
Posted by: Guest on July-09-2021
2

python get current month

Use:

from datetime import datetime
today = datetime.today()
datem = datetime(today.year, today.month, 1)
I assume you want the first of the month.
Posted by: Guest on March-08-2021

Code answers related to "python calendar show current month"

Python Answers by Framework

Browse Popular Code Answers by Language