Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Date filter (still) shows incorrect month names for Slavic languages #13999

Closed
Janneman84 opened this issue Feb 10, 2016 · 4 comments
Closed

Comments

@Janneman84
Copy link

As a follow up of this issue:
#10247

Languages like Polish and Croatian have different versions of months names depending on the context.

The Angular's localization files now have both versions present ("MONTH" and "STANDALONEMONTH"). But the date filter doesn't seems to be always using the right ones, actually it still only seems to use the "MONTH" version at all times

For example if you use "MMMM" to just get the month's name it should show the version from "STANDALONEMONTH".

Would it be possible to at least make the plain "MMMM" one behave correctly? Because if it does then AngularUI's datepicker will work correctly too. Thanks.

Or introduce a new code, like five M's ('MMMMM') or something for the standalone version so people can choose themselves what version should be used.

I'm on 1.4.9 by the way.

@Narretz
Copy link
Contributor

Narretz commented Feb 11, 2016

@Janneman84 do you want to give a PR for this a try?

@gkalpak
Copy link
Member

gkalpak commented Feb 11, 2016

I couldn't find it properly documented anywhere, but the Closure Library (which we get our locale data from), seem to be using LLLL for STANDALONEMONTH (e.g. see here and in other places in the source code).

I think it's reasonable to use LLLL as well. There seems also to be the LLL pattern for STANDALONESHORTMONTH, but we are not extracting that information (so I don't think we need LLL until someone asks for it - then we can consider it 😃).

@Janneman84
Copy link
Author

Using 'LLLL' sounds good, I'm looking forward for a PR or update.

'LLL' for short standalone month doesn't seem really necessary because it's the last part of the month's names that is different so the short versions are the same anyway. Maybe there is an exception somewhere, but at least not in Polish or Croatian.

@gkalpak
Copy link
Member

gkalpak commented Feb 13, 2016

I'm looking forward for a PR or update.

@Janneman84, LLLL has been already implemented in #14013 has been merged into master and v1.5.x 😃
It will be available in the 1.5.1 release onwards. You can try the latest code from master using https://code.angularjs.org/snapshot/angular.js.

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

No branches or pull requests

3 participants