You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2023/07/24 10:12:46 UTC
svn commit: r1911228 - in /poi/trunk: poi/src/main/java/org/apache/poi/ss/format/CellElapsedFormatter.java test-data/spreadsheet/ElapsedFormatTests.xlsx
Author: fanningpj
Date: Mon Jul 24 10:12:46 2023
New Revision: 1911228
URL: http://svn.apache.org/viewvc?rev=1911228&view=rev
Log:
[github-487] Round up seconds in CellElapsedFormatter. Thanks to Anthony Schott. This closes #487
Modified:
poi/trunk/poi/src/main/java/org/apache/poi/ss/format/CellElapsedFormatter.java
poi/trunk/test-data/spreadsheet/ElapsedFormatTests.xlsx
Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/format/CellElapsedFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/format/CellElapsedFormatter.java?rev=1911228&r1=1911227&r2=1911228&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/format/CellElapsedFormatter.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/format/CellElapsedFormatter.java Mon Jul 24 10:12:46 2023
@@ -59,7 +59,7 @@ public class CellElapsedFormatter extend
val = elapsed / factor;
else
val = elapsed / factor % modBy;
- if (type == '0')
+ if (type == '0' || type == 's')
return Math.round(val);
else
return (long) val;
Modified: poi/trunk/test-data/spreadsheet/ElapsedFormatTests.xlsx
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/ElapsedFormatTests.xlsx?rev=1911228&r1=1911227&r2=1911228&view=diff
==============================================================================
Binary files - no diff available.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org