4 ms·
It's harder to make that bug. The common case is "year of era", so it is likely to be used for "year()". On the other hand the much less often used "year of we
by cies 5y ago
It's harder to make that bug. The common case is "year of era", so it is likely to be used for "year()".
On the other hand the much less often used "year of week" would be named "year_of_week()" and hence it is clear to everyone that's not likely what you want.
- nicoburns 5y ago> It's harder to make that bug. The common case is "year of era", so it is likely to be used for "year()". That would be the sane thing to do. But the same applies to `YYYY`: it should be used for "year of era". But it hasn't been and that's the problem here. For contrast in moment.js, YYYY and yyyy do what you expect and "week year" is GGGG or gggg.
- masklinn 5y ago> That would be the sane thing to do. But the same applies to `YYYY`: it should be used for "year of era". Why? `yyyy` is simpler to type, so makes a lot more sense for "year of era". > For contrast in moment.js, YYYY and yyyy do what you expect and "week year" is GGGG or gggg. In LDML (which I assume is what SimpleDateFormat uses), the G field is already spoken for the era name (BC/BCE and AD/CE).