(some_date: date)
Returns quarters in DHIS2 web API `period format`_ in reverse
    chronological order.

    .. _period format: https://docs.dhis2.org/master/en/developer/html/webapi_date_perid_format.html
Returns quarters in DHIS2 web API `period format`_ in reverse
    chronological order.
Returns quarters in DHIS2 web API period format _ in reverse chronological order .
def previous_quarters_up_to(some_date: date) -> Iterable[str]:
    """
    Returns quarters in DHIS2 web API `period format`_ in reverse
    chronological order.

    .. _period format: https://docs.dhis2.org/master/en/developer/html/webapi_date_perid_format.html
    """
    current_date = datetime.utcnow().date()
    while current_date > some_date:
        yield previous_quarter(current_date)
        current_date -= relativedelta(months=3)
def previous_quarters_up_to ( some_date : date ) -> Iterable [ str ] : current_date = datetime . utcnow ( ) . date ( ) while current_date > some_date : yield previous_quarter ( current_date ) current_date -= relativedelta ( months = 3 )