Skip to content

Instantly share code, notes, and snippets.

@adrianomargarin
Created August 14, 2018 14:28
Show Gist options
  • Save adrianomargarin/95e2fc50a1c51027a3570c8678272c34 to your computer and use it in GitHub Desktop.
Save adrianomargarin/95e2fc50a1c51027a3570c8678272c34 to your computer and use it in GitHub Desktop.
from datetime import datetime
from dateutil.relativedelta import relativedelta
now = datetime.now()
first_day = now + relativedelta(day=1)
last_day = now + relativedelta(day=1, months=+1, days=-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment