You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/09/26 15:31:08 UTC
[Bug 58460] New: Cell.getDateCellValue() does not document special
case when cell value is between 0 and 1
https://bz.apache.org/bugzilla/show_bug.cgi?id=58460
Bug ID: 58460
Summary: Cell.getDateCellValue() does not document special case
when cell value is between 0 and 1
Product: POI
Version: 3.11-FINAL
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: SS Common
Assignee: dev@poi.apache.org
Reporter: vedant@lath.in
When a cell value is in the interval [0, 1),
org.apache.poi.ss.usermodel.Cell.getDateCellValue() returns a Date with the
date 1899-12-31. This cannot be converted back to an Excel Date as the year is
now less than 1900.
In such a case, the comparison excelDate ==
DateUtil.getExcelDate(DateUtil.getJavaDate(excelDate,false)) also fails.
It is not immediately apparent that excel dates in the interval [0, 1) do not
have an equivalent Date value in Java. A naive user might expect such a value
to be converted to 1900-01-01 xx:xx:xx instead of 1989-12-31 xx:xx:xx.
Please document this behaviour in the getDateCellValue() method and in the
DateUtil class.
--
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
[Bug 58460] Cell.getDateCellValue() does not document special case
when cell value is between 0 and 1
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58460
Vedant Lath <ve...@lath.in> changed:
What |Removed |Added
----------------------------------------------------------------------------
Hardware|PC |All
CC| |vedant@lath.in
OS|Linux |All
Severity|normal |trivial
--
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