Bug 63779 - RFE: Add support for the new Java date/time API added in Java 8
Summary: RFE: Add support for the new Java date/time API added in Java 8
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on: 63794
  Show dependency tree
Reported: 2019-09-28 10:53 UTC by Axel Howind
Modified: 2019-12-08 23:32 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Axel Howind 2019-09-28 10:53:36 UTC
Since version 4.0.1, Apache POI requires Java 8. In that Java version, the new date/time API was introduced which is both easier to use and less error prone than the old (and flawed) API consisting of java.util.Date etc.

Client code that uses the new LocalDate and LocalDateTime classes nonetheless has to convert dates to the now somewhat obsolete old classes when dealing with POI. To leverage this, support for LocalDate/LocalDateTime should be added to POI, namely the Cell interface and DateUtil class.

Since the old java.util.Date based API is still used by a lot of client code, support should be added in a backwards compatible way.

I volunteer to add this support, as well as doing some cleanup of the date/time handling.
Comment 1 Dominik Stadler 2019-10-09 19:17:37 UTC
Patch is applied via r1868198, thanks a lot for the implementation work!
Comment 2 PJ Fanning 2019-10-10 07:06:59 UTC
Should we have `@since` annotations on the new methods?
Comment 3 Andreas Beeker 2019-12-08 23:32:07 UTC
Activate round seconds feature again via r1871065