{"ast":null,"code":"import { isSameWeek } from \"../../../isSameWeek.mjs\";\n\n// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#1308\nconst accusativeWeekdays = [\"nedeľu\", \"pondelok\", \"utorok\", \"stredu\", \"štvrtok\", \"piatok\", \"sobotu\"];\nfunction lastWeek(day) {\n  const weekday = accusativeWeekdays[day];\n  switch (day) {\n    case 0: /* Sun */\n    case 3: /* Wed */\n    case 6 /* Sat */:\n      return \"'minulú \" + weekday + \" o' p\";\n    default:\n      return \"'minulý' eeee 'o' p\";\n  }\n}\nfunction thisWeek(day) {\n  const weekday = accusativeWeekdays[day];\n  if (day === 4 /* Thu */) {\n    return \"'vo' eeee 'o' p\";\n  } else {\n    return \"'v \" + weekday + \" o' p\";\n  }\n}\nfunction nextWeek(day) {\n  const weekday = accusativeWeekdays[day];\n  switch (day) {\n    case 0: /* Sun */\n    case 4: /* Wed */\n    case 6 /* Sat */:\n      return \"'budúcu \" + weekday + \" o' p\";\n    default:\n      return \"'budúci' eeee 'o' p\";\n  }\n}\nconst formatRelativeLocale = {\n  lastWeek: (date, baseDate, options) => {\n    const day = date.getDay();\n    if (isSameWeek(date, baseDate, options)) {\n      return thisWeek(day);\n    } else {\n      return lastWeek(day);\n    }\n  },\n  yesterday: \"'včera o' p\",\n  today: \"'dnes o' p\",\n  tomorrow: \"'zajtra o' p\",\n  nextWeek: (date, baseDate, options) => {\n    const day = date.getDay();\n    if (isSameWeek(date, baseDate, options)) {\n      return thisWeek(day);\n    } else {\n      return nextWeek(day);\n    }\n  },\n  other: \"P\"\n};\nexport const formatRelative = (token, date, baseDate, options) => {\n  const format = formatRelativeLocale[token];\n  if (typeof format === \"function\") {\n    return format(date, baseDate, options);\n  }\n  return format;\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}