function age(date, reversed = false) {
  const colorByAge = colorScale([7, 30, 180, 365, 730], undefined, !reversed)
  const daysElapsed = dayjs().diff(parseDate(date), 'days')
  return colorByAge(daysElapsed)
}
Determines the color used for a badge according to the age.
Age is calculated as days elapsed till current date.
The color varies from bright green to red as the age increases
or the other way around if `reverse` is given `true`.

@param {Date | string | number | dayjs } date JS Date object, string, unix timestamp or dayjs object
@param {boolean} reversed Reverse the color scale (the older, the better)
@returns {string} Badge color