Edgewall Software

Ticket #67 (closed defect: duplicate)

Opened 11 months ago

Last modified 2 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

Changed 11 months ago by jarek.zgoda@…

Changing the line 755 in dates.py to

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

does the trick.

Changed 11 months 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.

Changed 2 months 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.

Add/Change #67 (Stand-alone format babel.dates.format_date (pl_PL locale))

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.