create date code of the form YYYYMMDD inputs: d (optional): date code in the format of Sys.Date() for which to generate the date code, defaulting to 'today'

date_code(d = NA)