Skip to content

Commit

Permalink
German date formats (#247)
Browse files Browse the repository at this point in the history
* set moment locale also on app start
* added more german date formats
  • Loading branch information
Jens Tangermann authored and hql287 committed Mar 4, 2018
1 parent 439873d commit d11accd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/components/settings/_partials/invoice/Other.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,18 @@ function Other({
<option value="DD/MM/YY">
{moment(Date.now()).format('DD/MM/YY')} (DD/MM/YY)
</option>
<option value="dddd, Do MMMM YYYY">
{moment(Date.now()).format('dddd, Do MMMM YYYY')} (dddd, Do MMMM YYYY)
</option>
<option value="Do MMMM YYYY">
{moment(Date.now()).format('Do MMMM YYYY')} (Do MMMM YYYY)
</option>
<option value="DD.MM.YYYY">
{moment(Date.now()).format('DD.MM.YYYY')} (DD.MM.YYYY)
</option>
<option value="DD.MM.YY">
{moment(Date.now()).format('DD.MM.YY')} (DD.MM.YY)
</option>
</select>
</Field>
</Row>
Expand Down
2 changes: 2 additions & 0 deletions i18n/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ i18n.on('languageChanged', currentLang => {
moment.locale(currentLang);
});

moment.locale(defaultLanguage);

export default i18n;

0 comments on commit d11accd

Please sign in to comment.