def date_grouppings(date_read):
    """Extract date grouppings for given date."""
    if date_read:
        year = date_read.year
        month = date_read.date().replace(day=1)
    else:
        year = None
        month = None

    return year, month