Creates a new ContactDate based on str.
str
a date string in the format YYYY-MM-DD or YYYYMMDD
A new ContactDate struct.