]> source.dussan.org Git - poi.git/commitdiff
Fix bug #46184 - more odd escaped date formats
authorNick Burch <nick@apache.org>
Wed, 12 Nov 2008 15:31:34 +0000 (15:31 +0000)
committerNick Burch <nick@apache.org>
Wed, 12 Nov 2008 15:31:34 +0000 (15:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@713403 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/changes.xml
src/documentation/content/xdocs/status.xml
src/java/org/apache/poi/ss/usermodel/DateUtil.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java

index a641b9f4de187514de548b5dc1a71ea5bef853c8..ff277d20dda0a12d0f3490bc75da184d04ef508b 100644 (file)
@@ -37,6 +37,7 @@
 
                <!-- Don't forget to update status.xml too! -->
         <release version="3.5-beta4" date="2008-??-??">
+           <action dev="POI-DEVELOPERS" type="fix">46184 - More odd escaped date formats</action>
            <action dev="POI-DEVELOPERS" type="add">Include the sheet number in the output of XLS2CSVmra</action>
            <action dev="POI-DEVELOPERS" type="fix">46043 - correctly write out HPSF properties with HWPF</action>
            <action dev="POI-DEVELOPERS" type="add">45973 - added CreationHelper.createFormulaEvaluator(), implemeted both for HSSF and XSSF</action>
index 803d9cd6ead2ca13895f4aa8fc5e32a2d394629d..18922b442b68e93af6300f5cab821ffa23fe6835 100644 (file)
@@ -34,6 +34,7 @@
        <!-- Don't forget to update changes.xml too! -->
     <changes>
         <release version="3.5-beta4" date="2008-??-??">
+           <action dev="POI-DEVELOPERS" type="fix">46184 - More odd escaped date formats</action>
            <action dev="POI-DEVELOPERS" type="add">Include the sheet number in the output of XLS2CSVmra</action>
            <action dev="POI-DEVELOPERS" type="fix">46043 - correctly write out HPSF properties with HWPF</action>
            <action dev="POI-DEVELOPERS" type="add">45973 - added CreationHelper.createFormulaEvaluator(), implemeted both for HSSF and XSSF</action>
index aeeaa34617af1aff3db444c733a956f7106858de..90a7a5b5090cbcd4ef8441e73159ee1fe0d3f551 100644 (file)
@@ -211,6 +211,8 @@ public class DateUtil {
         fs = fs.replaceAll("\\\\-","-");
         // And \, into ,
         fs = fs.replaceAll("\\\\,",",");
+        // And \. into .
+        fs = fs.replaceAll("\\\\.",".");
         // And '\ ' into ' '
         fs = fs.replaceAll("\\\\ "," ");
 
index 9e451ee052aed2aa2167b7539fd1fe00a3a88af0..1d3941a02b3d4076d555916d8a15b8e75867fabf 100644 (file)
@@ -239,6 +239,7 @@ public final class TestHSSFDateUtil extends TestCase {
                 "dd-mm-yy", "dd-mm-yyyy",
                 "DD-MM-YY", "DD-mm-YYYY",
                 "dd\\-mm\\-yy", // Sometimes escaped
+                "dd.mm.yyyy", "dd\\.mm\\.yyyy",
 
                 // These crazy ones are valid
                 "yyyy-mm-dd;@", "yyyy/mm/dd;@",