[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Fix localization in java.text.SimpleDateFormat
From: |
Andrew John Hughes |
Subject: |
[cp-patches] Fix localization in java.text.SimpleDateFormat |
Date: |
Wed, 2 Feb 2005 01:18:01 +0000 |
User-agent: |
Mutt/1.5.6+20040907i |
I'm committing the attached patch to fix the following localization
issues in java.text.SimpleDateFormat:
* The compiled pattern is now always non-localized and thus
standard pattern characters are compared rather than localized
ones. This was causing an IllegalArgumentException with
locales with different pattern characters (e.g. GERMAN, de_DE,
where 'day' is represented by 't' for 'tag' The appearance of
'd' in the pattern caused problems, and the constructors are
supposed to take non-localized patterns (only input for localized
is via applyLocalizedPattern()).
* The exception for an illegal pattern is now thrown on construction
rather than on formatting, as specified in the current specification.
The compiled field class no longer uses dumb -1 codes as a result.
* Documentation was added for clarity, as well as a more expansive
toString() method (unspecified, but v. useful for debugging and
the class did have one before)
Changelog:
2005-02-02 Andrew John Hughes <address@hidden>
* java/text/SimpleDateFormat.java
Lots of documentation updates.
(readObject(java.io.ObjectInputStream)): Wraps
IllegalArgumentException as specified.
(compileFormat(String)): Uses standardChars
rather than the local pattern characters.
Throws IllegalArgumentException rather than
storing a -1 field.
(toString()): Extended to include all variables
in a better format.
(translateLocalizedPattern(String, String, String)):
Renamed to better define the use of this method.
--
Andrew :-)
Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
No software patents in Europe -- http://nosoftwarepatents.com
"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman
"We've all been part of the biggest beta test the world has ever known --
Windows"
-- Victor Wheatman, Gartner
dateformat-05.diff
Description: Text document
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Fix localization in java.text.SimpleDateFormat,
Andrew John Hughes <=