Skip to content

Commit

Permalink
[locale] es: Add es translation for invalidDate (#4560)
Browse files Browse the repository at this point in the history
* Add es translation for invalidDate

* Fix lint
  • Loading branch information
marwahaha authored Jan 24, 2019
1 parent 6a06e7a commit 39f63a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/locale/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@ export default moment.defineLocale('es', {
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
},
invalidDate: 'Fecha invalida'
});
3 changes: 3 additions & 0 deletions src/test/locale/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,6 @@ test('test short months proper', function (assert) {
assert.equal(moment(str, 'DD-MMM-YYYY').month(), '7', '02-ago-2016 month should be 7');
});

test('translated invalid date', function (assert) {
assert.equal(moment('nonsense', 'DD-MMM-YYYY').format(), 'Fecha invalida', 'Invalid date should translate');
});

0 comments on commit 39f63a5

Please sign in to comment.