poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50841] DataFormatter, DateUtil, and ExcelStyleDateFormatter issues
Date Sat, 19 Mar 2011 12:44:15 GMT

Yegor Kozlov <yegor@dinom.ru> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Yegor Kozlov <yegor@dinom.ru> 2011-03-19 08:44:11 EDT ---
Applied in r1083173

I changed my mind about subclassing DataFormatter, this class was not designed
for extension and it is much easier to add a new constructor to pass the
emulateCsv parameter. You should be able to run your code by replacing 
NcoDataFormatter with DataFormatter.

 Changes that apply to DataFormatter by default:

 - Support for elapsed time and [h], [m], and [s].
 - Rounding style for elapsed time is DOWN and uses float for calculations
instead of double.
 - support for scientific notation

 Changes that apply only when emulateCsv=true:

 - returned values are not trimmed and format spacers and respected
 - Invalid dates are formatted as 255 pound signs ("#")
 - simulate Excel's handling of a format string of all # when the value is 0.

Note that I changed the way how you propagate invalid formats using the
NDFNoNumbers exception and return a special subclass of Format instead.
Exceptions should be used only for exceptional conditions and not for normal
control flow.


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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message