B
Benjamin Stewart
Hello!
We are having what we perceive to be an error in the Gregorian calendar.
Running the following code;
/*
* blah.java
*
* Created on 30 June 2003, 11:52
*/
package source.com;
/**
*
* @author bstewart
*/
public class blah {
/** Creates a new instance of blah */
public blah() {
java.util.GregorianCalendar oCal = new
java.util.GregorianCalendar();
System.out.println(oCal.get(oCal.MONTH));
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
blah oblah = new blah();
}
}
If the current month is 6 but this function returns 5. We are finding
that everything is offset by 1. Now we assume that the arrays for this
object are zero based, am I supposed to treat our calendar as zero based
as well ?? Is this a bug or a feature ??
Ben
We are having what we perceive to be an error in the Gregorian calendar.
Running the following code;
/*
* blah.java
*
* Created on 30 June 2003, 11:52
*/
package source.com;
/**
*
* @author bstewart
*/
public class blah {
/** Creates a new instance of blah */
public blah() {
java.util.GregorianCalendar oCal = new
java.util.GregorianCalendar();
System.out.println(oCal.get(oCal.MONTH));
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
blah oblah = new blah();
}
}
If the current month is 6 but this function returns 5. We are finding
that everything is offset by 1. Now we assume that the arrays for this
object are zero based, am I supposed to treat our calendar as zero based
as well ?? Is this a bug or a feature ??
Ben