Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
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).
Note that there is also longer format ("L"), but it prints leading zeros with all (most?) languages, which is not what I want either.
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: