Skip to content

Commit

Permalink
[locale] fo: Fixed relativeTimes for m and M (#4609) (#4682)
Browse files Browse the repository at this point in the history
* [locale] fo: Fixed relativeTimes for m and M (#4609)

* Add new Faroese locale author

* Revert locale/* edit from commit b51d421.
  • Loading branch information
sakarisson authored and marwahaha committed Jan 21, 2019
1 parent 01ae8ca commit 38a19a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/locale/fo.js
@@ -1,6 +1,7 @@
//! moment.js locale configuration
//! locale : Faroese [fo]
//! author : Ragnar Johannesen : https://github.com/ragnar123
//! author : Kristian Sakarisson : https://github.com/sakarisson

import moment from '../moment';

Expand Down Expand Up @@ -31,13 +32,13 @@ export default moment.defineLocale('fo', {
past : '%s síðani',
s : 'fá sekund',
ss : '%d sekundir',
m : 'ein minutt',
m : 'ein minuttur',
mm : '%d minuttir',
h : 'ein tími',
hh : '%d tímar',
d : 'ein dagur',
dd : '%d dagar',
M : 'ein mánaði',
M : 'ein mánaður',
MM : '%d mánaðir',
y : 'eitt ár',
yy : '%d ár'
Expand Down
12 changes: 6 additions & 6 deletions src/test/locale/fo.js
Expand Up @@ -108,8 +108,8 @@ test('format week', function (assert) {
test('from', function (assert) {
var start = moment([2007, 1, 28]);
assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'fá sekund', '44 seconds = a few seconds');
assert.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), 'ein minutt', '45 seconds = a minute');
assert.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), 'ein minutt', '89 seconds = a minute');
assert.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), 'ein minuttur', '45 seconds = a minute');
assert.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), 'ein minuttur', '89 seconds = a minute');
assert.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), '2 minuttir', '90 seconds = 2 minutes');
assert.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), '44 minuttir', '44 minutes = 44 minutes');
assert.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), 'ein tími', '45 minutes = an hour');
Expand All @@ -123,13 +123,13 @@ test('from', function (assert) {
assert.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), 'ein dagur', '1 day = a day');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), '5 dagar', '5 days = 5 days');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), '25 dagar', '25 days = 25 days');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), 'ein mánaði', '26 days = a month');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), 'ein mánaði', '30 days = a month');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 43}), true), 'ein mánaði', '43 days = a month');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), 'ein mánaður', '26 days = a month');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), 'ein mánaður', '30 days = a month');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 43}), true), 'ein mánaður', '43 days = a month');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), '2 mánaðir', '46 days = 2 months');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), '2 mánaðir', '75 days = 2 months');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), '3 mánaðir', '76 days = 3 months');
assert.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), 'ein mánaði', '1 month = a month');
assert.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), 'ein mánaður', '1 month = a month');
assert.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), '5 mánaðir', '5 months = 5 months');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), 'eitt ár', '345 days = a year');
assert.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), '2 ár', '548 days = 2 years');
Expand Down

0 comments on commit 38a19a7

Please sign in to comment.