This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: Re-merge Date
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Subject: Patch: FYI: Re-merge Date
- From: Tom Tromey <tromey at redhat dot com>
- Date: 30 Jul 2001 21:27:37 -0600
- Reply-To: tromey at redhat dot com
I'm checking this in.
This fixes a minor bug reported to the Classpath list.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/util/Date.java: Re-merged with Classpath.
2001-07-30 Tom Tromey <tromey@redhat.com>
Index: java/util/Date.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/Date.java,v
retrieving revision 1.7
diff -u -r1.7 Date.java
--- java/util/Date.java 2001/06/14 15:41:57 1.7
+++ java/util/Date.java 2001/07/31 02:58:18
@@ -667,7 +667,8 @@
{
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(time);
- return cal.get(Calendar.DAY_OF_WEEK);
+ // For Calendar, Sunday is 1. For Date, Sunday is 0.
+ return cal.get(Calendar.DAY_OF_WEEK) - 1;
}
/**