Question: How to create datetime object representing the very last moment of the current month ?

Answer: 
Use a simple trick: Set the date to the first of the *next* month and then subtract one second/hour/day/as much as you need.
```
selected_date = date(some_year, some_month, some_day)

if selected_date.month == 12: # December
     last_day_selected_month = date(selected_date.year, selected_date.month, 31)
else:
     last_day_selected_month = date(selected_date.year, selected_date.month + 1, 1) - timedelta(days=1)

```

where 'timedelta(days=1)' might be a difference with next month and last moment of the previous month.