1

I want to get the last day of the current month as cleanly as possible.

I am thinking something like datetime.datetime.last_date_current_month() in a similiar fashion of datetime.datetime.today()

datetime.date.today().replace(month=datetime.date.today().month +1, day=1) - relativedelta(days=1)

works but is horrible :)

Fabian Bosler
  • 2,310
  • 2
  • 29
  • 49

0 Answers0