def convert_list_of_days_to_tags(listin):
    """Convert a list of datetime.date objects to Tickler tags,
    i.e. D##."""
    fmt = 'D%0.2i'
    tags = []
    for date in listin:
        if hasattr(date,'day'):
            myint = date.day
        elif type(date) == int:
            myint = date
        elif type(date) == float:
            myint = int(date)
        else:
            raise TypeError, "I don't know what to do with %s" % date
        tag = fmt % myint
        tags.append(tag)
    return tags