Make get_localized_time work with datetime.date, add tests