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] es: Add es translation for invalidDate #4560

Merged
merged 2 commits into from
Jan 24, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
});