Calendar to Date conversion for dates before 15 Oct 1582. Gregorian to Julian calendar switch
Given that Gregorian Calendar start date is 15 Oct 1582, please consider the following tests and please help me understanding what happens: import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import javax.xml.datatype.DatatypeFactory; import org.junit.Test; @Test public void gregorianToDateConversion() { GregorianCalendar calendar = null; Date date = null; calendar = new GregorianCalendar(1582, 9, 04); date = calendar.getTime(); System.out.println("new GregorianCalendar(1582, 9, 4) -> calendar[DAY_OF_MONTH ["+calendar.get(Calendar.DAY_OF_MONTH)+"], MONTH ["