import moment from "moment"

export function formatDates(length = 6, format = "YYYY-MM-DD") {
  const dates = []
  for (let i = length; i >= 0; i--) {
    dates.push(moment().subtract(i, "day").format(format))
  }
  return dates
}

export function emptyValue(length) {
  return new Array(length).fill(0)
}