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

           Summary: date with am/pm isn't regarded as date formated data
           Product: POI
           Version: 3.0-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=21952)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21952)
Fixes of the date formated data with am/pm

For any date cell with am/pm in the format isn't regarded as date formated
data. For example: isADateFormat return false with the cell of '4/2/2007 
12:00:00 AM'.
The simple fixes attached below:
Index: src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java
===================================================================
--- src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java    (revision
655573)
+++ src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java    (working copy)
@@ -226,7 +226,7 @@

        // Otherwise, check it's only made up, in any case, of:
        //  y m d h s - / , . :
-       if(fs.matches("^[yYmMdDhHsS\\-/,. :]+$")) {
+       if(fs.matches("^[yYmMdDhHsSAP\\-/,. :]+$")) {
                return true;
        }


-- 
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