Loomio

Format of the date is different from what we use

SStrajk Sun 20 Dec 2020 9:11PMPublicSeen by 44

Currently it appears as day, month, day of the month and an hour.
Is there an option to change it globally for polish language. If possible, the best would be:

"czw. godz. 23:00, 31 grudnia 2020" or if not possible to add year:

"czw. godz. 23:00, 31 grudnia"

In polish language we do not use shortcuts for months and use "godz." shortcut before giving an hour/time.

RG

Robert GuthrieSun 20 Dec 2020 9:38PM

It is possible.

We use date-fns to format dates. It has good localization support. What you're seeing is a date passed into the format function.

We use the following date formats:

  • this year approximate: "MMM d"

  • another year approximate: "yyyy-MM-dd"

  • this year exact: 'EEE MMM d HH:mm'

  • another year exact: 'yyyy EEE MMM d HH:mm'

These are explained on this page:

https://date-fns.org/v2.16.1/docs/format

Do you think you could supply formats for polish? I will add support for per language date formats

RG

Robert GuthrieSun 20 Dec 2020 9:46PM

@Weronika would it work if we just used 2020-12-21 format?

S

StrajkSun 20 Dec 2020 11:13PM

So interesting! 2020-12-21 is yyyy-MM-dd yes? It would work just perfectly.

RG

Robert GuthrieMon 21 Dec 2020 2:12AM

Ok I've updated our date formats based on this conversation. It will be live in 5 minutes from now.

S

StrajkMon 21 Dec 2020 9:35AM

Thank you.