parse_date

class convert2.parse_date.Anything2Date[source]

Parse anything to datetime.date.

The logic:

  • for int, it’s the datetime.fromordinal(value)
  • for float, it’s a invalid input
  • for str, try to parse date
  • for datetime type, it’s the date part
  • for date type, it’s itself