diff options
author | Michael Koch <konqueror@gmx.de> | 2003-06-21 12:42:26 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-06-21 12:42:26 +0000 |
commit | 73c7dd50e8f9b03e6fbc64212566d1a2d603aed2 (patch) | |
tree | a6fa0c9f0fdd054674395836f55efab40ef19fe3 /libjava/java/text/SimpleDateFormat.java | |
parent | 5ee8128f1b139e4e1e6330acca7c014aee28abc7 (diff) | |
download | gcc-73c7dd50e8f9b03e6fbc64212566d1a2d603aed2.tar.gz |
DateFormat.java, [...]: New versions from classpath.
2003-06-21 Michael Koch <konqueror@gmx.de>
* java/text/DateFormat.java,
java/text/SimpleDateFormat.java,
java/util/Locale.java:
New versions from classpath.
From-SVN: r68300
Diffstat (limited to 'libjava/java/text/SimpleDateFormat.java')
-rw-r--r-- | libjava/java/text/SimpleDateFormat.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libjava/java/text/SimpleDateFormat.java b/libjava/java/text/SimpleDateFormat.java index 7b282f3c62f..67523e1628d 100644 --- a/libjava/java/text/SimpleDateFormat.java +++ b/libjava/java/text/SimpleDateFormat.java @@ -384,10 +384,10 @@ public class SimpleDateFormat extends DateFormat SimpleDateFormat sdf = (SimpleDateFormat)o; - if (!toPattern().equals(sdf.toPattern())) + if (defaultCentury != sdf.defaultCentury) return false; - if (!get2DigitYearStart().equals(sdf.get2DigitYearStart())) + if (!toPattern().equals(sdf.toPattern())) return false; if (!getDateFormatSymbols().equals(sdf.getDateFormatSymbols())) @@ -396,6 +396,17 @@ public class SimpleDateFormat extends DateFormat return true; } + /** + * This method returns a hash value for this object. + * + * @return A hash value for this object. + */ + public int hashCode() + { + return super.hashCode() ^ toPattern().hashCode() ^ defaultCentury ^ + getDateFormatSymbols().hashCode(); + } + /** * Formats the date input according to the format string in use, |