const prependZero = (value: number) => {
  if (value > 9) return value
  return `0${value}`
}

export const serializeDate = (key: string, date: Date) => (
  `${date.getFullYear()}-${prependZero(date.getMonth() + 1)}-${prependZero(date.getDate())}`
)
