You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
233 B
12 lines
233 B
8 years ago
|
# -*- coding: utf-8 -*-
|
||
|
from __future__ import unicode_literals
|
||
|
# Erik Stein <code@classlibrary.net>, 2016
|
||
|
|
||
|
|
||
|
import calendar
|
||
|
|
||
|
|
||
|
def get_last_of_month(d):
|
||
|
day = calendar.monthrange(d.year, d.month)[1]
|
||
|
return d.replace(day=day)
|