Bug 44373 - Patch for HSSFDateUtil.isADateFormat() to recognize other date(time) formats
Summary: Patch for HSSFDateUtil.isADateFormat() to recognize other date(time) formats
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-FINAL
Hardware: Other All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2008-02-07 03:50 UTC by Miroslav
Modified: 2008-02-07 06:02 UTC (History)
0 users



Attachments
patch for HSSFDateUtil.isADateFormat() (426 bytes, patch)
2008-02-07 03:51 UTC, Miroslav
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav 2008-02-07 03:50:15 UTC
Current implementation (as of 3.0.2) does not recognize correctly date formats
containing format specifiers in upper case, nor it recognizes dot as a date
separator and time format specifiers as a valid datetime format.

Attached patch adds these format specifiers to the regex.
Change: "^[ymd\\-/, ]+$" => "^[yYmMdDhHsS\\-/,. :]+$"
Comment 1 Miroslav 2008-02-07 03:51:24 UTC
Created attachment 21491 [details]
patch for HSSFDateUtil.isADateFormat()
Comment 2 Nick Burch 2008-02-07 06:02:58 UTC
Thanks for this patch, applied to trunk (along with a test)