Created
May 6, 2014 20:39
-
-
Save dtanham/fa730b16631d84585e87 to your computer and use it in GitHub Desktop.
Last day of month (30, 31, 28, 29)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Calculates the end date for any given datetime object""" | |
import calendar | |
def last_day(year, month): | |
return calendar.monthrange(year, month)[1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment