Skip to content

Instantly share code, notes, and snippets.

@brettfreer
Last active May 24, 2016 06:28
Show Gist options
  • Save brettfreer/dae0899a8c697963e7d1f3071020bb88 to your computer and use it in GitHub Desktop.
Save brettfreer/dae0899a8c697963e7d1f3071020bb88 to your computer and use it in GitHub Desktop.
Return first day of month
import datetime
def first_day_of_month(d):
return datetime.date(d.year, d.month, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment