javascript-time-ago
Advanced tools
Comparing version 2.3.5 to 2.3.6
@@ -36,2 +36,7 @@ <!-- | ||
2.3.6 / 25.05.2021 | ||
================== | ||
* [Added](https://github.com/catamphetamine/javascript-time-ago/pull/47) `mini` style (aka `twitter` style) for some locales: `da`, `sv`, `nl`, `it`, `fr`, `es`. By [@trustpilot](https://github.com/trustpilot). | ||
2.3.5 / 12.05.2021 | ||
@@ -38,0 +43,0 @@ ================== |
@@ -17,4 +17,4 @@ "use strict"; | ||
it('should fallback from "mini" to "narrow"', function () { | ||
var timeAgo = new _TimeAgo.default('it'); | ||
timeAgo.format(Date.now() - 3 * _steps.hour * 1000, 'twitter').should.equal('3 h fa'); | ||
var timeAgo = new _TimeAgo.default('ccp'); | ||
timeAgo.format(Date.now() - 3 * _steps.hour * 1000, 'twitter').should.equal('3 𑄊𑄮𑄚𑄴𑄓 𑄃𑄉𑄬'); | ||
}); | ||
@@ -153,3 +153,3 @@ it('should format Twitter style relative time (English) (round: "round")', function () { | ||
formatDatePastBy(_steps.minute).should.equal('1 min'); | ||
formatDatePastBy(_steps.minute).should.equal('1 min.'); | ||
formatDatePastBy(_steps.hour).should.equal('1 h'); | ||
@@ -156,0 +156,0 @@ formatDatePastBy(_steps.day + 62 * _steps.minute).should.equal('9 avr.'); |
{ | ||
"year": "{0}año", | ||
"month": "{0}mes", | ||
"week": "{0}sem.", | ||
"day": "{0}d", | ||
"hour": "{0}h", | ||
"minute": "{0}m", | ||
"second": "{0}s" | ||
"year": { | ||
"one": "{0} año", | ||
"other": "{0} años" | ||
}, | ||
"month": { | ||
"one": "{0} mes", | ||
"other": "{0} meses" | ||
}, | ||
"week": "{0} sem.", | ||
"day": { | ||
"one": "{0} día", | ||
"other": "{0} días" | ||
}, | ||
"hour": { | ||
"one": "{0} hora", | ||
"other": "{0} horas" | ||
}, | ||
"minute": "{0} min.", | ||
"second": "{0} seg." | ||
} |
{ | ||
"year": "{0} a", | ||
"month": "{0} m.", | ||
"year": { | ||
"one": "{0} an", | ||
"other": "{0} ans" | ||
}, | ||
"month": "{0} mois", | ||
"week": "{0} sem.", | ||
"day": "{0} j", | ||
"day": { | ||
"one": "{0} jour", | ||
"other": "{0} jours" | ||
}, | ||
"hour": "{0} h", | ||
"minute": "{0} min", | ||
"second": "{0} s" | ||
"minute": "{0} min.", | ||
"second": "{0} sec." | ||
} |
@@ -262,2 +262,21 @@ { | ||
}, | ||
"mini": { | ||
"year": "{0} år", | ||
"month": { | ||
"one": "{0} md.", | ||
"other": "{0} mdr." | ||
}, | ||
"week": { | ||
"one": "{0} uge", | ||
"other": "{0} uger" | ||
}, | ||
"day": { | ||
"one": "{0} dag", | ||
"other": "{0} dage" | ||
}, | ||
"hour": "{0} t.", | ||
"minute": "{0} min.", | ||
"second": "{0} sek.", | ||
"now": "nu" | ||
}, | ||
"long-time": { | ||
@@ -264,0 +283,0 @@ "year": { |
@@ -233,9 +233,21 @@ { | ||
"mini": { | ||
"year": "{0}año", | ||
"month": "{0}mes", | ||
"week": "{0}sem.", | ||
"day": "{0}d", | ||
"hour": "{0}h", | ||
"minute": "{0}m", | ||
"second": "{0}s", | ||
"year": { | ||
"one": "{0} año", | ||
"other": "{0} años" | ||
}, | ||
"month": { | ||
"one": "{0} mes", | ||
"other": "{0} meses" | ||
}, | ||
"week": "{0} sem.", | ||
"day": { | ||
"one": "{0} día", | ||
"other": "{0} días" | ||
}, | ||
"hour": { | ||
"one": "{0} hora", | ||
"other": "{0} horas" | ||
}, | ||
"minute": "{0} min.", | ||
"second": "{0} seg.", | ||
"now": "ahora" | ||
@@ -242,0 +254,0 @@ }, |
@@ -215,9 +215,15 @@ { | ||
"mini": { | ||
"year": "{0} a", | ||
"month": "{0} m.", | ||
"year": { | ||
"one": "{0} an", | ||
"other": "{0} ans" | ||
}, | ||
"month": "{0} mois", | ||
"week": "{0} sem.", | ||
"day": "{0} j", | ||
"day": { | ||
"one": "{0} jour", | ||
"other": "{0} jours" | ||
}, | ||
"hour": "{0} h", | ||
"minute": "{0} min", | ||
"second": "{0} s", | ||
"minute": "{0} min.", | ||
"second": "{0} sec.", | ||
"now": "maintenant" | ||
@@ -224,0 +230,0 @@ }, |
@@ -262,2 +262,21 @@ { | ||
}, | ||
"mini": { | ||
"year": { | ||
"one": "{0} anno", | ||
"other": "{0} anni" | ||
}, | ||
"month": { | ||
"one": "{0} mese", | ||
"other": "{0} mesi" | ||
}, | ||
"week": "{0} sett.", | ||
"day": "{0} gior.", | ||
"hour": { | ||
"one": "{0} ora", | ||
"other": "{0} ore" | ||
}, | ||
"minute": "{0} min.", | ||
"second": "{0} sec.", | ||
"now": "adesso" | ||
}, | ||
"long-time": { | ||
@@ -264,0 +283,0 @@ "year": { |
@@ -256,2 +256,18 @@ { | ||
}, | ||
"mini": { | ||
"year": "{0} jr.", | ||
"month": "{0} mnd.", | ||
"week": { | ||
"one": "{0} week", | ||
"other": "{0} wkn." | ||
}, | ||
"day": { | ||
"one": "{0} dag", | ||
"other": "{0} dgn." | ||
}, | ||
"hour": "{0} uur", | ||
"minute": "{0} min.", | ||
"second": "{0} sec.", | ||
"now": "nu" | ||
}, | ||
"long-time": { | ||
@@ -258,0 +274,0 @@ "year": { |
@@ -214,2 +214,15 @@ { | ||
}, | ||
"mini": { | ||
"year": "{0} år", | ||
"month": "{0} mån.", | ||
"week": "{0} v.", | ||
"day": { | ||
"one": "{0} dag", | ||
"other": "{0} dagar" | ||
}, | ||
"hour": "{0} tim.", | ||
"minute": "{0} min", | ||
"second": "{0} sek.", | ||
"now": "nu" | ||
}, | ||
"long-time": { | ||
@@ -216,0 +229,0 @@ "year": { |
@@ -10,4 +10,4 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
it('should fallback from "mini" to "narrow"', function () { | ||
var timeAgo = new TimeAgo('it'); | ||
timeAgo.format(Date.now() - 3 * hour * 1000, 'twitter').should.equal('3 h fa'); | ||
var timeAgo = new TimeAgo('ccp'); | ||
timeAgo.format(Date.now() - 3 * hour * 1000, 'twitter').should.equal('3 𑄊𑄮𑄚𑄴𑄓 𑄃𑄉𑄬'); | ||
}); | ||
@@ -146,3 +146,3 @@ it('should format Twitter style relative time (English) (round: "round")', function () { | ||
formatDatePastBy(minute).should.equal('1 min'); | ||
formatDatePastBy(minute).should.equal('1 min.'); | ||
formatDatePastBy(hour).should.equal('1 h'); | ||
@@ -149,0 +149,0 @@ formatDatePastBy(day + 62 * minute).should.equal('9 avr.'); |
{ | ||
"name": "javascript-time-ago", | ||
"version": "2.3.5", | ||
"version": "2.3.6", | ||
"description": "Localized relative date/time formatting", | ||
@@ -5,0 +5,0 @@ "main": "index.commonjs.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2573471
783
62349