diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-06-28 17:26:46 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-06-28 17:43:56 -0700 |
| commit | e4fa1e69e7ebfb627c7198fd1a9881e9327ec4d4 (patch) | |
| tree | 06284a538a6008eca75051399e47db4e5d50301c /node_modules/date-fns/locale/is/_lib/formatDistance/index.js | |
initial commit: scaffolding
Diffstat (limited to 'node_modules/date-fns/locale/is/_lib/formatDistance/index.js')
| -rw-r--r-- | node_modules/date-fns/locale/is/_lib/formatDistance/index.js | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/node_modules/date-fns/locale/is/_lib/formatDistance/index.js b/node_modules/date-fns/locale/is/_lib/formatDistance/index.js new file mode 100644 index 0000000..02c5f56 --- /dev/null +++ b/node_modules/date-fns/locale/is/_lib/formatDistance/index.js @@ -0,0 +1,91 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var formatDistanceLocale = { + lessThanXSeconds: { + one: 'minna en 1 sekúnda', + other: 'minna en {{count}} sekúndur' + }, + xSeconds: { + one: '1 sekúnda', + other: '{{count}} sekúndur' + }, + halfAMinute: 'hálf mínúta', + lessThanXMinutes: { + one: 'minna en 1 mínúta', + other: 'minna en {{count}} mínútur' + }, + xMinutes: { + one: '1 mínúta', + other: '{{count}} mínútur' + }, + aboutXHours: { + one: 'u.þ.b. 1 klukkustund', + other: 'u.þ.b. {{count}} klukkustundir' + }, + xHours: { + one: '1 klukkustund', + other: '{{count}} klukkustundir' + }, + xDays: { + one: '1 dagur', + other: '{{count}} dagar' + }, + aboutXWeeks: { + one: 'um viku', + other: 'um {{count}} vikur' + }, + xWeeks: { + one: '1 viku', + other: '{{count}} vikur' + }, + aboutXMonths: { + one: 'u.þ.b. 1 mánuður', + other: 'u.þ.b. {{count}} mánuðir' + }, + xMonths: { + one: '1 mánuður', + other: '{{count}} mánuðir' + }, + aboutXYears: { + one: 'u.þ.b. 1 ár', + other: 'u.þ.b. {{count}} ár' + }, + xYears: { + one: '1 ár', + other: '{{count}} ár' + }, + overXYears: { + one: 'meira en 1 ár', + other: 'meira en {{count}} ár' + }, + almostXYears: { + one: 'næstum 1 ár', + other: 'næstum {{count}} ár' + } +}; +var formatDistance = function formatDistance(token, count, options) { + var result; + var tokenValue = formatDistanceLocale[token]; + if (typeof tokenValue === 'string') { + result = tokenValue; + } else if (count === 1) { + result = tokenValue.one; + } else { + result = tokenValue.other.replace('{{count}}', count.toString()); + } + if (options !== null && options !== void 0 && options.addSuffix) { + if (options.comparison && options.comparison > 0) { + return 'í ' + result; + } else { + return result + ' síðan'; + } + } + return result; +}; +var _default = formatDistance; +exports.default = _default; +module.exports = exports.default;
\ No newline at end of file |
