This project is archived and is in readonly mode.

#272 ✓resolved
ju1ius

Date.format() bug with localization

Reported by ju1ius | February 28th, 2010 @ 05:13 AM | in 1.3.0.1 rc1

date.format uses substr(0.3) to output short names for days & months. Accented characters in the localization classes are encoded as html entities.
So if the desired day/month has an accented character in his first three letters,
the html entity is broken.
For example in French, "february" = "février" = "février".
So myDateInFebruary.format('%b') returns "f&e" instead of "fév".

The only solution I can think of is to use an actual array for days/month abbreviation,
which would make sense as cutting the word after the 3rd letter in not always the right way to go.
Again in French, "June" = "Juin" and "July" = "Juillet", so both short names are "Jui"...

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

Attachments

Pages