Like eq but compares datetime with y,m,d tuple.
    Also accepts magic string 'TODAY'.

def eqdate(y):
    """
    Like eq but compares datetime with y,m,d tuple.
    Also accepts magic string 'TODAY'.
    """
    y = datetime.date.today() if y == 'TODAY' else datetime.date(*y)
    return lambda x: x == y