This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: FYI: Re-merge Date


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;
   }
 
   /**


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]