classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] java.text.DateFormat parsing fix


From: Andrew John Hughes
Subject: [cp-patches] java.text.DateFormat parsing fix
Date: Sat, 22 Jan 2005 00:09:54 +0000
User-agent: Mutt/1.5.6+20040907i

I'm committing the attached patch which fixes nearly half
the failures in the Mauve parsing tests for java.text.SimpleDateFormat.
The remaining 8 are problems with java.util.Calendar, rather than the
current parsing process (the values are being read and set to Calendar
correctly).  I'll put these into Savannah as bugs to track this problem,
although I believe Sven is already working on this as a follow-up to his recent
patch.

As a thought for the future, it would be better if we had the timezone
data being pulled from an external source, as we do with most other
data of this nature (currencies, date formats, etc.).  At present,
the list is created in the file, which I had to extend for this
patch.  However, this data isn't present in the CLDR.  Any suggestions?

Changelog:

2005-01-21  Andrew John Hughes  <address@hidden>

        * java/text/SimpleDateFormat.java:
        (parse(String, java.text.ParsePosition)):
        Changed 'E' and 'M' cases to use both
        short and long names.  Extended 'z'
        case to also handle 'Z', and deal
        with simple GMT offsets such as +0100.
        (computeOffset(String)): New private method,
        which converts a GMT offset specification,
        such as GMT-0500 to a numeric offset in
        milliseconds.
        * java/util/TimeZone.java:
        (timezones()): Added "CEST", the daylight
        savings time version of "CET", or Central
        European Time.
        
-- 
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

Attachment: dateformat-03.diff
Description: Text document

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]