java.lang.Date#getDay
Yuji Yamaguchi
yamag at distribution.co.jp
Fri Sep 25 22:16:09 PDT 1998
Hi,
java.util.Date#getDay returns the day of the week,
and the value returned is between 0 and 6.
However, Kaffe's value returns between 1 and 7.
This is the patch.
Index: kaffe/libraries/javalib/java/util/Date.java
===================================================================
RCS file: /home/cvspublic/kaffe/libraries/javalib/java/util/Date.java,v
retrieving revision 1.1
diff -u -r1.1 Date.java
--- Date.java 1998/07/14 17:02:07 1.1
+++ Date.java 1998/09/26 20:01:56
@@ -94,7 +94,7 @@
{
Calendar cal = Calendar.getInstance();
cal.setTime(this);
- return (cal.get(Calendar.DAY_OF_WEEK));
+ return (cal.get(Calendar.DAY_OF_WEEK) - Calendar.SUNDAY);
}
public int getHours()
--
// Yuji Yamaguchi - yamag at distribution.co.jp -
// Freeware Distribution Service Co.,Ltd.
More information about the kaffe
mailing list