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

"Russian" date formatting does not show leading zeroes for date on Media page #517

Closed
romanrm opened this issue Oct 28, 2019 · 3 comments

Comments

@romanrm
Copy link

@romanrm romanrm commented Oct 28, 2019

In the date column: https://romanrm.hk/2019-10-28T071043Z-vdb.png
Should be "01.08.2015" and so on. Never noticed this issue before, so it might be a recent change(?)

@riipah

This comment has been minimized.

Copy link
Member

@riipah riipah commented Oct 28, 2019

I'm using the "shorthard date" format with moment.js. For "ru" locale it prints dates without leading zeros. If that's wrong, you should report a bug for moment.js. This has been there for ages (years).

moment.locale("ru");
moment("2019-01-01").format("l"); // prints 1.1.2019

Note that there is also longer format ("L"), but it prints leading zeros with all (most?) languages, which is not what I want either.

@riipah riipah closed this Oct 28, 2019
@romanrm

This comment has been minimized.

Copy link
Author

@romanrm romanrm commented Oct 28, 2019

I wanted to find the specific line in their code to point at for the correction, but couldn't figure it out yet; the "ru" locale https://github.com/moment/moment/blob/develop/src/locale/ru.js doesn't seem to define a format for "l", it only seems to have "L", which would have leading zeroes ("DD.MM.YYYY"). Perhaps "l" is inherited from some base locale or such.

Also, it is hard to find a concrete official source which would state that leading zeroes are required, only have Wikipedia (https://en.wikipedia.org/wiki/Date_and_time_notation_in_Europe#Post-Soviet_states) and my own experience.

Across VDB currently it looks a bit inconsistent, in most places leading zeroes are present no problem, such as in release and addition dates on song, album, artist and event pages, and on some lists such as:
https://vocadb.net/Event
https://vocadb.net/Search?searchType=Album

But on others they are not, including:
https://vocadb.net/Search?searchType=ReleaseEvent
https://vocadb.net/Song/Rankings
https://vocadb.net/SongList/Featured

@riipah

This comment has been minimized.

Copy link
Member

@riipah riipah commented Oct 28, 2019

Some of the dates are formatted server side (using .NET), some in client (mostly moment). .NET and moment may have different formattings yes, but there's not much I can do about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.