View | Details | Raw Unified | Return to bug 43489
Collapse All | Expand All

(-)src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java (-6 / +4 lines)
Lines 44-52 Link Here
44
{
44
{
45
45
46
	public static final int CALENDAR_JANUARY = 0;
46
	public static final int CALENDAR_JANUARY = 0;
47
	public static final int CALENDAR_FEBRUARY = 0;
47
	public static final int CALENDAR_FEBRUARY = 1;
48
	public static final int CALENDAR_MARCH = 0;
48
	public static final int CALENDAR_MARCH = 2;
49
	public static final int CALENDAR_APRIL = 0;
49
	public static final int CALENDAR_APRIL = 3;
50
50
51
    public TestHSSFDateUtil(String s)
51
    public TestHSSFDateUtil(String s)
52
    {
52
    {
Lines 313-320 Link Here
313
        assertTrue(HSSFDateUtil.isADateFormat(style.getDataFormat(), style.getDataFormatString(wb)));
313
        assertTrue(HSSFDateUtil.isADateFormat(style.getDataFormat(), style.getDataFormatString(wb)));
314
        assertTrue(HSSFDateUtil.isCellDateFormatted(cell));
314
        assertTrue(HSSFDateUtil.isCellDateFormatted(cell));
315
    }
315
    }
316
    /*
316
    
317
        //commented out until find the reson.
318
    public void testDateBug_2Excel() {
317
    public void testDateBug_2Excel() {
319
        assertEquals(59.0, HSSFDateUtil.getExcelDate(createDate(1900, CALENDAR_FEBRUARY, 28)), 0.00001);
318
        assertEquals(59.0, HSSFDateUtil.getExcelDate(createDate(1900, CALENDAR_FEBRUARY, 28)), 0.00001);
320
        assertEquals(61.0, HSSFDateUtil.getExcelDate(createDate(1900, CALENDAR_MARCH, 1)), 0.00001);
319
        assertEquals(61.0, HSSFDateUtil.getExcelDate(createDate(1900, CALENDAR_MARCH, 1)), 0.00001);
Lines 324-330 Link Here
324
        assertEquals(37257.00, HSSFDateUtil.getExcelDate(createDate(2002, CALENDAR_JANUARY, 1)), 0.00001);
323
        assertEquals(37257.00, HSSFDateUtil.getExcelDate(createDate(2002, CALENDAR_JANUARY, 1)), 0.00001);
325
        assertEquals(38074.00, HSSFDateUtil.getExcelDate(createDate(2004, CALENDAR_MARCH, 28)), 0.00001);
324
        assertEquals(38074.00, HSSFDateUtil.getExcelDate(createDate(2004, CALENDAR_MARCH, 28)), 0.00001);
326
    }
325
    }
327
    */
328
    
326
    
329
    public void testDateBug_2Java() {
327
    public void testDateBug_2Java() {
330
        assertEquals(createDate(1900, Calendar.FEBRUARY, 28), HSSFDateUtil.getJavaDate(59.0));
328
        assertEquals(createDate(1900, Calendar.FEBRUARY, 28), HSSFDateUtil.getJavaDate(59.0));

Return to bug 43489