Bug 54557

Summary: DateUtil.isADateFormat returns false positives
Product: POI Reporter: Jeremy Michelson <jeremys.poibugs>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.4   
Attachments: Test program exhibiting the 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.