Return-Path: Delivered-To: apmail-poi-commits-archive@locus.apache.org Received: (qmail 10403 invoked from network); 20 May 2008 16:37:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 May 2008 16:37:36 -0000 Received: (qmail 15376 invoked by uid 500); 20 May 2008 16:37:38 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 15342 invoked by uid 500); 20 May 2008 16:37:38 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 15333 invoked by uid 99); 20 May 2008 16:37:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 09:37:38 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 16:37:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E1EE72388A37; Tue, 20 May 2008 09:37:15 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r658322 - in /poi/trunk/src: documentation/content/xdocs/changes.xml documentation/content/xdocs/status.xml java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java Date: Tue, 20 May 2008 16:37:15 -0000 To: commits@poi.apache.org From: nick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080520163715.E1EE72388A37@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nick Date: Tue May 20 09:37:15 2008 New Revision: 658322 URL: http://svn.apache.org/viewvc?rev=658322&view=rev Log: Fix bug #44977 - Support for AM/PM in excel date formats Modified: poi/trunk/src/documentation/content/xdocs/changes.xml poi/trunk/src/documentation/content/xdocs/status.xml poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java Modified: poi/trunk/src/documentation/content/xdocs/changes.xml URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/changes.xml?rev=658322&r1=658321&r2=658322&view=diff ============================================================================== --- poi/trunk/src/documentation/content/xdocs/changes.xml (original) +++ poi/trunk/src/documentation/content/xdocs/changes.xml Tue May 20 09:37:15 2008 @@ -37,6 +37,7 @@ + 44977 - Support for AM/PM in excel date formats Support for specifying a policy to HSSF on missing / blank cells when fetching 44937 - Partial support for extracting Escher images from HWPF files 44824 - Avoid an infinite loop when reading some HWPF pictures Modified: poi/trunk/src/documentation/content/xdocs/status.xml URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=658322&r1=658321&r2=658322&view=diff ============================================================================== --- poi/trunk/src/documentation/content/xdocs/status.xml (original) +++ poi/trunk/src/documentation/content/xdocs/status.xml Tue May 20 09:37:15 2008 @@ -34,6 +34,7 @@ + 44977 - Support for AM/PM in excel date formats Support for specifying a policy to HSSF on missing / blank cells when fetching 44937 - Partial support for extracting Escher images from HWPF files 44824 - Avoid an infinite loop when reading some HWPF pictures Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java?rev=658322&r1=658321&r2=658322&view=diff ============================================================================== --- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java (original) +++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java Tue May 20 09:37:15 2008 @@ -226,7 +226,8 @@ // Otherwise, check it's only made up, in any case, of: // y m d h s - / , . : - if(fs.matches("^[yYmMdDhHsS\\-/,. :]+$")) { + // optionally followed by AM/PM + if(fs.matches("^[yYmMdDhHsS\\-/,. :]+[ampAMP]*$")) { return true; } Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java?rev=658322&r1=658321&r2=658322&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java (original) +++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java Tue May 20 09:37:15 2008 @@ -266,6 +266,8 @@ formats = new String[] { "yyyy-mm-dd hh:mm:ss", "yyyy/mm/dd HH:MM:SS", "mm/dd HH:MM", "yy/mmm/dd SS", + "mm/dd HH:MM AM", "mm/dd HH:MM am", + "mm/dd HH:MM PM", "mm/dd HH:MM pm" }; for(int i=0; i