A simple function to convert a date provided in any of several formats to a chron date

get_chron_date(d)

Arguments

d

The date of interest. Can be any of: c(year, month, day) c(year, month, day, hour) Date format date (e.g., as.Date('1970-01-01', origin='1970-01-01')) chron date character format, e.g. '1970-01-01'

Value

date in chron format