Bug 52438 - [PATCH] Patch to CellDateFormatter for formats with hours and minutes but not seconds
Summary: [PATCH] Patch to CellDateFormatter for formats with hours and minutes but not...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.8-dev
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-08 16:34 UTC by Steve Vysny
Modified: 2012-01-09 18:22 UTC (History)
0 users



Attachments
Patch svn diff (934 bytes, text/plain)
2012-01-08 16:34 UTC, Steve Vysny
Details
DateFormatTests.xlsx with new test (11.19 KB, application/octet-stream)
2012-01-08 16:39 UTC, Steve Vysny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Vysny 2012-01-08 16:34:49 UTC
Created attachment 28123 [details]
Patch svn diff

Attached patch resolves issue in CellDataFormatter that causes date-time values to be formatted incorrectly for a format with hours and minutes but not seconds (e.g. "h:m").

New test case added to DateFormatTests.xlsx (sheet 'Tests', row 42).

Additional change to DateFormatTests.xlsx: on sheet 'Flags', deleted value of Categories flag and changed value of AllColors flag to True, so that all tests in the workbook are run.
Comment 1 Steve Vysny 2012-01-08 16:39:17 UTC
Created attachment 28124 [details]
DateFormatTests.xlsx with new test
Comment 2 Nick Burch 2012-01-09 18:22:43 UTC
Thanks, patch applied in r1229281.

(As an aside, this code looks to duplicate some of the things in DataFormatter, so long term we should probably try to merge the logic of the two where possible)