grandfatherson/__init__.py
def dates_to_keep(dates,
                  years=0, months=0, weeks=0, days=0, firstweekday=SATURDAY,
                  now=None):
    """
    Return a set of dates that should be kept, out of ``dates``.

    See ``to_keep`` for a description of arguments.
    """
    datetimes = to_keep((datetime.combine(d, time()) for d in dates),
                        years=years, months=months, weeks=weeks, days=days,
                        hours=0, minutes=0, seconds=0,
                        firstweekday=firstweekday, now=now)
    return set(dt.date() for dt in datetimes)
def dates_to_keep(dates,
                  years=0, months=0, weeks=0, days=0, firstweekday=SATURDAY,
                  now=None):
    datetimes = to_keep((datetime.combine(d, time()) for d in dates),
                        years=years, months=months, weeks=weeks, days=days,
                        hours=0, minutes=0, seconds=0,
                        firstweekday=firstweekday, now=now)
    return set(dt.date() for dt in datetimes)
def dates_to_keep ( dates , years = 0 , months = 0 , weeks = 0 , days = 0 , firstweekday = SATURDAY , now = None ) : datetimes = to_keep ( ( datetime . combine ( d , time ( ) ) for d in dates ) , years = years , months = months , weeks = weeks , days = days , hours = 0 , minutes = 0 , seconds = 0 , firstweekday = firstweekday , now = now ) return set ( dt . date ( ) for dt in datetimes )
Return a set of dates that should be kept, out of ``dates``.

    See ``to_keep`` for a description of arguments.
Return a set of dates that should be kept out of dates .