Bug 54557 - DateUtil.isADateFormat returns false positives
Summary: DateUtil.isADateFormat returns false positives
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: PC Mac OS X 10.4
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-13 16:19 UTC by Jeremy Michelson
Modified: 2013-02-13 16:45 UTC (History)
0 users



Attachments
Test program exhibiting the bug (321 bytes, application/octet-stream)
2013-02-13 16:19 UTC, Jeremy Michelson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Michelson 2013-02-13 16:19:01 UTC
Created attachment 29948 [details]
Test program exhibiting the bug

DateUtil.isCellFormatted(Cell) returns true for a numeric cell that's formatted as ".0000".  Tracing through the code, this is because DateUtil.isADateFormat(165, ".0000") is returning true.  That's obviously not a date format; maybe date_ptrn3 needs to be made more strict?

I've enclosed a simple program which exhibits this.
Comment 1 Nick Burch 2013-02-13 16:45:20 UTC
Thanks for the report, fixed in r1445725.