const f = 12;
function u(t) {
  switch (t) {
    case "fr_CA":
      return "fr-CA";
    case "en_CA":
    default:
      return "en-CA";
  }
}
function g(t, e, r = "long") {
  const n = u(e), a = new Date((/* @__PURE__ */ new Date()).getFullYear(), t);
  return new Intl.DateTimeFormat(n, { month: r }).format(
    a
  );
}
function c(t, e) {
  return new Date(e, t, 0, 4).getDate();
}
function l(t, e) {
  return Array.from(
    { length: c(t + 1, e) },
    (n, a) => a + 1
  ).map((n) => {
    const a = new Date(e, t, n);
    return a.setHours(0, 0, 0, 0), a;
  });
}
function D(t, e) {
  return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
}
function i(t) {
  return D(/* @__PURE__ */ new Date(), t);
}
function m(t, e) {
  t.setHours(0, 0, 0, 0);
  const r = new Date(t);
  return new Date(r.setDate(r.getDate() - e));
}
function w(t, e) {
  return new Date(t, e, 1);
}
function h(t, e) {
  return new Date(t, e + 1, 0);
}
function y(t, e) {
  e.setHours(0, 0, 0, 0);
  const r = new Date(t.start.setHours(0, 0, 0, 0)), n = new Date(t.end.setHours(0, 0, 0, 0));
  return e >= r && e <= n;
}
function A(t, e, r) {
  const n = t.getDate(), a = n < 10 ? `0${n}` : n, o = t.getMonth() + 1, s = t.getFullYear();
  switch (r) {
    case "select":
      return `${a}/${o}/${s}`;
    case "chip":
    default:
      return new Intl.DateTimeFormat(e === "fr_CA" ? "fr-CA" : "en-CA", {
        dateStyle: "medium"
      }).format(t);
  }
}
export {
  f as YEARS_TO_DISPLAY,
  A as formatDate,
  l as getDays,
  c as getDaysInMonth,
  w as getFirstDayOfMonth,
  D as getIsSameDay,
  i as getIsToday,
  h as getLastDayOfMonth,
  g as getMonthName,
  y as isInDateRange,
  m as subDays
};
