def _get_month_period(self):
        start = datetime.datetime(self.now.year, self.now.month, 1)

        if self.now.month == 12:
            end = datetime.datetime(self.now.year, self.now.month, 31, 23, 59, 59, 999999)
        else:
            end = datetime.datetime(self.now.year, self.now.month + 1, 1, 23, 59, 59, 999999) - datetime.timedelta(1)

        return start.strftime(self.template), end.strftime(self.template)
Returns beginning and an end for a month period.
dataset/ETHPy150Open maxtepkeev/architect/architect/databases/utilities.py/DateTime._get_month_period