const MS_PER_DAY = 24 * 60 * 60 * 1e3;
function pluralCategory(locale, count) {
  try {
    return new Intl.PluralRules(locale).select(count);
  } catch {
    return count === 1 ? "one" : "other";
  }
}
function eventDisplayTitle(title, fallback) {
  return title && title.trim().length > 0 ? title : fallback;
}
function composeAccessibleName(parts, separator = ", ") {
  return parts.map((part) => typeof part === "string" ? part.trim() : "").filter((part) => part.length > 0).join(separator);
}
function parseDateInput(value) {
  const parsed = /* @__PURE__ */ new Date(`${value}T00:00:00`);
  return parsed.getTime();
}
function multiDayEventSpan(startDate, endDate) {
  const start = parseDateInput(startDate);
  const end = parseDateInput(endDate);
  if (Number.isNaN(start) || Number.isNaN(end)) return 0;
  const dayDiff = Math.round((end - start) / MS_PER_DAY);
  if (dayDiff < 1) return 0;
  return dayDiff + 1;
}
export {
  composeAccessibleName,
  eventDisplayTitle,
  multiDayEventSpan,
  pluralCategory
};
//# sourceMappingURL=labels.js.map
