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/hu/_lib/formatDistance | |
initial commit: scaffolding
Diffstat (limited to 'node_modules/date-fns/locale/hu/_lib/formatDistance')
| -rw-r--r-- | node_modules/date-fns/locale/hu/_lib/formatDistance/index.js | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/node_modules/date-fns/locale/hu/_lib/formatDistance/index.js b/node_modules/date-fns/locale/hu/_lib/formatDistance/index.js new file mode 100644 index 0000000..c6e6e35 --- /dev/null +++ b/node_modules/date-fns/locale/hu/_lib/formatDistance/index.js @@ -0,0 +1,81 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var translations = { + about: 'körülbelül', + over: 'több mint', + almost: 'majdnem', + lessthan: 'kevesebb mint' +}; +var withoutSuffixes = { + xseconds: ' másodperc', + halfaminute: 'fél perc', + xminutes: ' perc', + xhours: ' óra', + xdays: ' nap', + xweeks: ' hét', + xmonths: ' hónap', + xyears: ' év' +}; +var withSuffixes = { + xseconds: { + '-1': ' másodperccel ezelőtt', + '1': ' másodperc múlva', + '0': ' másodperce' + }, + halfaminute: { + '-1': 'fél perccel ezelőtt', + '1': 'fél perc múlva', + '0': 'fél perce' + }, + xminutes: { + '-1': ' perccel ezelőtt', + '1': ' perc múlva', + '0': ' perce' + }, + xhours: { + '-1': ' órával ezelőtt', + '1': ' óra múlva', + '0': ' órája' + }, + xdays: { + '-1': ' nappal ezelőtt', + '1': ' nap múlva', + '0': ' napja' + }, + xweeks: { + '-1': ' héttel ezelőtt', + '1': ' hét múlva', + '0': ' hete' + }, + xmonths: { + '-1': ' hónappal ezelőtt', + '1': ' hónap múlva', + '0': ' hónapja' + }, + xyears: { + '-1': ' évvel ezelőtt', + '1': ' év múlva', + '0': ' éve' + } +}; +var formatDistance = function formatDistance(token, count, options) { + var adverb = token.match(/about|over|almost|lessthan/i); + var unit = adverb ? token.replace(adverb[0], '') : token; + var addSuffix = (options === null || options === void 0 ? void 0 : options.addSuffix) === true; + var key = unit.toLowerCase(); + var comparison = (options === null || options === void 0 ? void 0 : options.comparison) || 0; + var translated = addSuffix ? withSuffixes[key][comparison] : withoutSuffixes[key]; + var result = key === 'halfaminute' ? translated : count + translated; + if (adverb) { + var adv = adverb[0].toLowerCase(); + result = translations[adv] + ' ' + result; + } + return result; +}; +var _default = formatDistance; +exports.default = _default; +module.exports = exports.default;
\ No newline at end of file |
