happenings/managers.py
def get_first_and_last(year, month):
        """Returns two datetimes: first day and last day of given year&month"""
        ym_first = make_aware(
            datetime.datetime(year, month, 1),
            get_default_timezone()
        )
        ym_last = make_aware(
            datetime.datetime(year, month, monthrange(year, month)[1], 23, 59, 59, 1000000-1),
            get_default_timezone()
        )
        return ym_first, ym_last
def get_first_and_last(year, month):
        """Returns two datetimes: first day and last day of given year&month"""
        ym_first = make_aware(
            datetime.datetime(year, month, 1),
            get_default_timezone()
        )
        ym_last = make_aware(
            datetime.datetime(year, month, monthrange(year, month)[1], 23, 59, 59, 1000000-1),
            get_default_timezone()
        )
        return ym_first, ym_last
def get_first_and_last ( year , month ) : ym_first = make_aware ( datetime . datetime ( year , month , 1 ) , get_default_timezone ( ) ) ym_last = make_aware ( datetime . datetime ( year , month , monthrange ( year , month ) [ 1 ] , 23 , 59 , 59 , 1000000 - 1 ) , get_default_timezone ( ) ) return ym_first , ym_last
Returns two datetimes: first day and last day of given year&month
Returns two datetimes : first day and last day of given year&month