python find last date of previous month dates code example
Example: python datetime last day of month
>>import calendar
>>year, month = 2016, 12
>>calendar.monthrange(year, month)[1]
31
>>import calendar
>>year, month = 2016, 12
>>calendar.monthrange(year, month)[1]
31