]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[locale] fa: Fix typo (#5013)
authorsm2017 <socketman2016@gmail.com>
Fri, 24 Apr 2020 11:17:42 +0000 (15:47 +0430)
committerGitHub <noreply@github.com>
Fri, 24 Apr 2020 11:17:42 +0000 (14:17 +0300)
src/locale/fa.js
src/test/locale/fa.js

index 0d377a5d647009554f2999aebe615b9d5073f255..c49e21a2428de16f196b6e1b1313bab802948b9f 100644 (file)
@@ -66,7 +66,7 @@ export default moment.defineLocale('fa', {
         future : 'در %s',
         past : '%s پیش',
         s : 'چند ثانیه',
-        ss : 'ثانیه d%',
+        ss : '%d ثانیه',
         m : 'یک دقیقه',
         mm : '%d دقیقه',
         h : 'یک ساعت',
index 2758d5f1ae185a78499d81bca663e650b49d54cf..0704ab408b60e65a97ad7c8424c4db45f502c1ed 100644 (file)
@@ -128,6 +128,13 @@ test('from', function (assert) {
     assert.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), '۲ سال',       '548 days = 2 years');
     assert.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true),   'یک سال',      '1 year = a year');
     assert.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true),   '۵ سال',       '5 years = 5 years');
+    var s = moment.relativeTimeThreshold('s');
+    var ss = moment.relativeTimeThreshold('ss');
+    moment.relativeTimeThreshold('s', 60);
+    moment.relativeTimeThreshold('ss', 0);
+    assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true),  '۴۴ ثانیه', '44 seconds = 44 seconds');
+    moment.relativeTimeThreshold('s', s);
+    moment.relativeTimeThreshold('ss', ss);
 });
 
 test('suffix', function (assert) {