Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[locale] fo: Fixed relativeTimes for m and M (#4609) #4682

Merged
merged 3 commits into from Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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