'Translates an ISO 8601 date to a date object.
Args:
date: A date string as YYYY-MM-DD.
time_func: A time.time() compatible function, which can be overridden for
testing.
Returns:
A date object representing the last day of logs to get.
If no date is given, returns today in the US/Pacific timezone.'

@staticmethod
def _ParseEndDate(date, time_func=time.time):

    if (not date):
        return PacificDate(time_func())
    return datetime.date(*[int(i) for i in date.split('-')])
