Edgewall Software
Modify

Ticket #67 (closed defect: duplicate)

Opened 4 years ago

Last modified 18 months ago

Stand-alone format babel.dates.format_date (pl_PL locale)

Reported by: jarek.zgoda@… Owned by: cmlenz
Priority: major Milestone:
Component: Date Formatting Version: 0.9.1
Keywords: Cc:

Description

There's no difference in output of babel.dates.format_date with format MMMM and LLLL when Polish locale is in use.

>>> babel.dates.format_date(format='MMMM')
u'wrze\u015bnia'
>>> babel.dates.format_date(format='LLLL')
u'wrze\u015bnia'

The correct output in second case should be u'wrzesie\u0144'.

The function babel.dates.get_month_names() works correctly and gives different results if called with context='stand-alone' and with context="format". It looks like the problem lies in DateTimeFormat?.format_month.

Attachments

Change History

comment:1 Changed 4 years ago by jarek.zgoda@…

Changing the line 755 in dates.py to

context = {'M': 'format', 'L': 'stand-alone'}[char]

does the trick.

comment:2 Changed 4 years ago by cmlenz

That change looks good, but we need to fix #68 before applying it, I think. Otherwise date formatting might fail for too many locales.

comment:3 Changed 4 years ago by cmlenz

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone 1.0 deleted

I just fixed this in [381] anyway, in the context of #75 (which should have been marked as duplicate of this ticket, but hey).

Still really need to get CLDR alias handling in.

comment:5 Changed 3 years ago by Jarek Zgoda <jarek.zgoda@…>

Could you please remove the ability to comment closed tickets? I'm getting spammed...

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.