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

Date formatting utils #201

Open
Windvis opened this issue Feb 21, 2022 · 4 comments
Open

Date formatting utils #201

Windvis opened this issue Feb 21, 2022 · 4 comments

Comments

@Windvis
Copy link
Contributor

Windvis commented Feb 21, 2022

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
Copy link
Contributor

Dietr commented Feb 22, 2022

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
Copy link
Contributor Author

Windvis commented Feb 22, 2022

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 😄.

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 😄.

@Windvis
Copy link
Contributor Author

Windvis commented Oct 13, 2022

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

@Windvis
Copy link
Contributor Author

Windvis commented Nov 5, 2024

I'm still not 100% sure what this should look like.

Do we simply create a au-format-date helper (and formDate util for JS contexts) that expects a date and outputs DD-MM-YYYY? I know some projects also use a longer version but I'm not sure if we should support that here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants