https://issues.apache.org/bugzilla/show_bug.cgi?id=50841
--- Comment #2 from Yegor Kozlov <[email protected]> 2011-03-14 09:04:18 EDT --- I'm reviewing your patch. My plan is to create a subclass of DataFormatter and encapsulate CSV-specific logic in it. NcoDataFormatter should share common stuff, not duplicate it. Fixes in date detection and formatting (items 8 - 11 from differences.txt) seem to be generic and I'm going to apply them directly to DateUtil and ExcelStyleDateFormatter. To support elapsed time you proposed to change Pattern date_ptrn2 = Pattern.compile("^\\[[a-zA-Z]+\\]"); to Pattern date_ptrn2 = Pattern.compile("^\\[[A-Z]+\\]"); (item 8 from differences.txt). This "loosened" regex will skip formats with a prefixed color, e.g. [yellow]yyyy-mm-dd or [red][hh] I'm going to define a fourth regexp for the elapsed time patterns: // elapsed time patterns: [h],[m] and [s] private static final Pattern date_ptrn4 = Pattern.compile("^\\[([hH]+|[mM]+|[sS]+)\\]"); and use it in combination with date_ptrn2. Other than that, very cool! Thank you for the patch. Yegor -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
