export function formatDateForCanvas(date) {
  const d = new Date(date);
  let month = "" + (d.getMonth() + 1);
  let day = "" + d.getDate();
  const year = d.getFullYear();
  if (month.length < 2)
    month = "0" + month;
  if (day.length < 2)
    day = "0" + day;
  return [year, month, day].join("-");
}
export function getOneYearAgoToday(date) {
  const d = new Date(date);
  return new Date(d.setFullYear(d.getFullYear() - 1));
}
export const findRelevantOptionsByClass = (element, className) => {
  if (element.nodeType !== 1) {
    return undefined;
  }
  return element.classList.contains(className)
    ? [element]
    : Array.from(element.querySelectorAll(className));
};
//# sourceMappingURL=utils.js.map
