appuniversum / ember-appuniversum

Ember addon wrapping the appuniversum components.
https://appuniversum.github.io/ember-appuniversum
MIT License
14 stars 11 forks source link

Date formatting utils #201

Open Windvis opened 2 years ago

Windvis commented 2 years ago

All projects have a need to format dates before showing the data to the users. This is usually done by using ember-moment's {{moment-format}} helper with a custom format, or with custom helpers that the projects implement themselves.

To reduce the custom code, and make it consistent across projects it might be better to make this part of ember-appuniversum? It's not strictly related to appuniversum itself, so a dedicated addon could also work.

It's not clear yet which formatt should be used though. There are some differences between projects with 21.02.2022 and 21/02/2022 being the main contenders.

Dietr commented 2 years ago

Yes, we also really need some guidelines in the documentation here. Not only for dates but other things like button labels (add, delete, ...), page titles, general copy. I prefer to do this in ember-appuniversum.

From what I see in most projects 21/02/2022 seems the most unambiguous. Using dots as separators seems more fitted for numbers like 10.000,00.

Windvis commented 2 years ago

Sounds good!

I think the format needs to be decided by someone at ABB though. Felix seemed hesitant to switch to the / version since it might make certain users unhappy, which makes me feel it's a more sensitive issue than I expected :smile:.

I also found this: https://taaladvies.net/datumnotatie/ which mentions the following:

De notatie met streepjes is vooral in Nederland gebruikelijk. De notatie met punten is de schrijfwijze die in België is vastgelegd in de norm NBN Z 01-002 Indelen en opmaken van documenten (2002) van het Bureau voor Normalisatie (NBN).

Which makes it sound like the . version is somewhat official? There also is no mention of the / version. The "streepjes" version looks like this: 21-02-2022, so that's a third format :smile:.

Windvis commented 1 year ago

The decision was made to use the DD-MM-YYYY format so this is now unblocked.