Commit 6298e32f authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'js-i18n-datetime' into 'master'

i18n datetime_utility file

See merge request gitlab-org/gitlab-ce!29193
parents 86e2f133 12b6a1d5
...@@ -81,7 +81,7 @@ export const getDayName = date => ...@@ -81,7 +81,7 @@ export const getDayName = date =>
*/ */
export const formatDate = datetime => { export const formatDate = datetime => {
if (_.isString(datetime) && datetime.match(/\d+-\d+\d+ /)) { if (_.isString(datetime) && datetime.match(/\d+-\d+\d+ /)) {
throw new Error('Invalid date'); throw new Error(__('Invalid date'));
} }
return dateFormat(datetime, 'mmm d, yyyy h:MMtt Z'); return dateFormat(datetime, 'mmm d, yyyy h:MMtt Z');
}; };
......
...@@ -5369,6 +5369,9 @@ msgstr "" ...@@ -5369,6 +5369,9 @@ msgstr ""
msgid "Invalid Login or password" msgid "Invalid Login or password"
msgstr "" msgstr ""
msgid "Invalid date"
msgstr ""
msgid "Invalid feature" msgid "Invalid feature"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment