(cls, days, enddate=None, format=ISO_DATE_FORMAT, inclusive=True, timezone=pytz.utc)
return DateSpan(start, end, format, inclusive, timezone)
Generate a DateSpan ending with a certain date, and starting at a date that will
        include N number of days.

        The endddate defaults to yesterday midnight for inclusive request
        (which means it will look like today midnight);
        defaults to today midnight for non inclusive requests

        e.g: enddate=7/21/2013, days=7, inclusive=True => 7/15/2013 - 7/21/2013 (15, 16, 17, 18, 19, 20, 21)
        e.g: enddate=7/21/2013, days=7, inclusive=False => 7/14/2013 - 7/21/2013 (14, 15, 16, 17, 18, 19, 20)

        Will always ignore times.
Generate a DateSpan ending with a certain date, and starting at a date that will
        include N number of days.
Generate a DateSpan ending with a certain date and starting at a date that will include N number of days .
def since(cls, days, enddate=None, format=ISO_DATE_FORMAT, inclusive=True, timezone=pytz.utc):
        """
        Generate a DateSpan ending with a certain date, and starting at a date that will
        include N number of days.

        The endddate defaults to yesterday midnight for inclusive request
        (which means it will look like today midnight);
        defaults to today midnight for non inclusive requests

        e.g: enddate=7/21/2013, days=7, inclusive=True => 7/15/2013 - 7/21/2013 (15, 16, 17, 18, 19, 20, 21)
        e.g: enddate=7/21/2013, days=7, inclusive=False => 7/14/2013 - 7/21/2013 (14, 15, 16, 17, 18, 19, 20)

        Will always ignore times.
        """
        if enddate is None:
            enddate = datetime.datetime.now(tz=timezone)
            if inclusive:
                enddate = enddate - datetime.timedelta(days=1)

        if inclusive:
            days += -1

        end = datetime.datetime(enddate.year, enddate.month, enddate.day)
        start = end - datetime.timedelta(days=days)
        return DateSpan(start, end, format, inclusive, timezone)
def since ( cls , days , enddate = None , format = ISO_DATE_FORMAT , inclusive = True , timezone = pytz . utc ) : if enddate is None : enddate = datetime . datetime . now ( tz = timezone ) if inclusive : enddate = enddate - datetime . timedelta ( days = 1 ) if inclusive : days += - 1 end = datetime . datetime ( enddate . year , enddate . month , enddate . day ) start = end - datetime . timedelta ( days = days ) return DateSpan ( start , end , format , inclusive , timezone )