https://issues.apache.org/bugzilla/show_bug.cgi?id=45531

           Summary: HSSFDateUtil.getJavaDate() should return Date for
                    negative cell values numbers
           Product: POI
           Version: 3.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


HSSFDateUtil.getJavaDate( int ) returns null, because:

isValidExcelDate() returns false for negative numbers.

Although, I've tried filling my great-grandmother's birth date (1.8.1898), and
Excel stores this as a negative number, which is convertible back to Date using
the computation code in getJavaDate(double date, boolean use1904windowing).

Is there some reason for limiting isValidExcelDate() to positive numbers?

I suggest to overload HSSFDateUtil.getJavaDate( int, boolean, boolean ) which
would allow converting negative values to date.

Thanks, Ondra Zizka.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to