Browse Source

Patch from Steve Vysny from bug #52438 - Update CellDateFormatter to handle times without seconds

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1229281 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_3_8_FINAL
Nick Burch 12 years ago
parent
commit
e0198826c3

+ 1
- 0
src/documentation/content/xdocs/status.xml View File

@@ -34,6 +34,7 @@

<changes>
<release version="3.8-beta6" date="2012-??-??">
<action dev="poi-developers" type="fix">52438 - Update CellDateFormatter to handle times without seconds</action>
<action dev="poi-developers" type="add">52389 - Support ?/? as well as #/# fractions, and tighten DataFormatter rules for fraction matching</action>
<action dev="poi-developers" type="add">52200 - Updated XWPF table example code </action>
<action dev="poi-developers" type="add">52378 - Support for WORKDAY and NETWORKDAYS functions</action>

+ 5
- 1
src/java/org/apache/poi/ss/format/CellDateFormatter.java View File

@@ -90,7 +90,11 @@ public class CellDateFormatter extends CellFormatter {
case 'M':
mStart = pos;
mLen = part.length();
return part.toUpperCase();
// For 'm' after 'h', output minutes ('m') not month ('M')
if (hStart >= 0)
return part.toLowerCase();
else
return part.toUpperCase();

case 'y':
case 'Y':

BIN
test-data/spreadsheet/DateFormatTests.xlsx View File


Loading…
Cancel
Save