Revision: 638
          http://stripes.svn.sourceforge.net/stripes/?rev=638&view=rev
Author:   mongus
Date:     2007-11-28 16:01:14 -0800 (Wed, 28 Nov 2007)

Log Message:
-----------
added a zero-width negative lookbehind to pattern because it was getting rid of 
the dash in time zone (GMT-xx:xx) causing unit test failure

Modified Paths:
--------------
    trunk/stripes/src/net/sourceforge/stripes/validation/DateTypeConverter.java

Modified: 
trunk/stripes/src/net/sourceforge/stripes/validation/DateTypeConverter.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/validation/DateTypeConverter.java 
2007-11-28 22:03:51 UTC (rev 637)
+++ trunk/stripes/src/net/sourceforge/stripes/validation/DateTypeConverter.java 
2007-11-29 00:01:14 UTC (rev 638)
@@ -87,12 +87,12 @@
     
     /**
      * A pattern used to pre-process Strings before the parsing attempt is 
made.  Since
-     * SimpleDateFormat stricly enforces that the separator characters in the 
input are the same
+     * SimpleDateFormat strictly enforces that the separator characters in the 
input are the same
      * as those in the pattern, this regular expression is used to remove 
commas, slashes, hyphens
      * and periods from the input String (replacing them with spaces) and to 
collapse multiple
      * white-space characters into a single space.
      */
-    public static final Pattern pattern = Pattern.compile("[\\s,-/\\.]+");
+    public static final Pattern pattern = 
Pattern.compile("(?<!GMT)[\\s,-/\\.]+");
 
     /** The default set of date patterns used to parse dates with 
SimpleDateFormat. */
     public static final String[] formatStrings = new String[] {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to