{"ast":null,"code":"function futureSeconds(text) {\n  return text.replace(/sekuntia?/, \"sekunnin\");\n}\nfunction futureMinutes(text) {\n  return text.replace(/minuuttia?/, \"minuutin\");\n}\nfunction futureHours(text) {\n  return text.replace(/tuntia?/, \"tunnin\");\n}\nfunction futureDays(text) {\n  return text.replace(/päivää?/, \"päivän\");\n}\nfunction futureWeeks(text) {\n  return text.replace(/(viikko|viikkoa)/, \"viikon\");\n}\nfunction futureMonths(text) {\n  return text.replace(/(kuukausi|kuukautta)/, \"kuukauden\");\n}\nfunction futureYears(text) {\n  return text.replace(/(vuosi|vuotta)/, \"vuoden\");\n}\nconst formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"alle sekunti\",\n    other: \"alle {{count}} sekuntia\",\n    futureTense: futureSeconds\n  },\n  xSeconds: {\n    one: \"sekunti\",\n    other: \"{{count}} sekuntia\",\n    futureTense: futureSeconds\n  },\n  halfAMinute: {\n    one: \"puoli minuuttia\",\n    other: \"puoli minuuttia\",\n    futureTense: _text => \"puolen minuutin\"\n  },\n  lessThanXMinutes: {\n    one: \"alle minuutti\",\n    other: \"alle {{count}} minuuttia\",\n    futureTense: futureMinutes\n  },\n  xMinutes: {\n    one: \"minuutti\",\n    other: \"{{count}} minuuttia\",\n    futureTense: futureMinutes\n  },\n  aboutXHours: {\n    one: \"noin tunti\",\n    other: \"noin {{count}} tuntia\",\n    futureTense: futureHours\n  },\n  xHours: {\n    one: \"tunti\",\n    other: \"{{count}} tuntia\",\n    futureTense: futureHours\n  },\n  xDays: {\n    one: \"päivä\",\n    other: \"{{count}} päivää\",\n    futureTense: futureDays\n  },\n  aboutXWeeks: {\n    one: \"noin viikko\",\n    other: \"noin {{count}} viikkoa\",\n    futureTense: futureWeeks\n  },\n  xWeeks: {\n    one: \"viikko\",\n    other: \"{{count}} viikkoa\",\n    futureTense: futureWeeks\n  },\n  aboutXMonths: {\n    one: \"noin kuukausi\",\n    other: \"noin {{count}} kuukautta\",\n    futureTense: futureMonths\n  },\n  xMonths: {\n    one: \"kuukausi\",\n    other: \"{{count}} kuukautta\",\n    futureTense: futureMonths\n  },\n  aboutXYears: {\n    one: \"noin vuosi\",\n    other: \"noin {{count}} vuotta\",\n    futureTense: futureYears\n  },\n  xYears: {\n    one: \"vuosi\",\n    other: \"{{count}} vuotta\",\n    futureTense: futureYears\n  },\n  overXYears: {\n    one: \"yli vuosi\",\n    other: \"yli {{count}} vuotta\",\n    futureTense: futureYears\n  },\n  almostXYears: {\n    one: \"lähes vuosi\",\n    other: \"lähes {{count}} vuotta\",\n    futureTense: futureYears\n  }\n};\nexport const formatDistance = (token, count, options) => {\n  const tokenValue = formatDistanceLocale[token];\n  const result = count === 1 ? tokenValue.one : tokenValue.other.replace(\"{{count}}\", String(count));\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return tokenValue.futureTense(result) + \" kuluttua\";\n    } else {\n      return result + \" sitten\";\n    }\n  }\n  return result;\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}