Checks if x is date-time object or day of the year (doy) and returns doy.
prep.date(x)
x
date-time object or Day of the year
Day of the year