Skip to content

Commit

Permalink
Update future relative time for Italian
Browse files Browse the repository at this point in the history
  • Loading branch information
atscott committed May 7, 2018
1 parent 3062ca1 commit 2e5f48a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/locale/it.js
Expand Up @@ -35,9 +35,7 @@ export default moment.defineLocale('it', {
sameElse: 'L'
},
relativeTime : {
future : function (s) {
return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
},
future : 'tra %s',
past : '%s fa',
s : 'alcuni secondi',
ss : '%d secondi',
Expand Down
4 changes: 2 additions & 2 deletions src/test/locale/it.js
Expand Up @@ -138,12 +138,12 @@ test('from', function (assert) {
});

test('suffix', function (assert) {
assert.equal(moment(30000).from(0), 'in alcuni secondi', 'prefix');
assert.equal(moment(30000).from(0), 'tra alcuni secondi', 'prefix');
assert.equal(moment(0).from(30000), 'alcuni secondi fa', 'suffix');
});

test('fromNow', function (assert) {
assert.equal(moment().add({s: 30}).fromNow(), 'in alcuni secondi', 'in seconds');
assert.equal(moment().add({s: 30}).fromNow(), 'tra alcuni secondi', 'in seconds');
assert.equal(moment().add({d: 5}).fromNow(), 'tra 5 giorni', 'in 5 days');
});

Expand Down

0 comments on commit 2e5f48a

Please sign in to comment.