Index: test/com/google/gwt/i18n/client/DateTimeParse_en_Test.java
===================================================================
--- test/com/google/gwt/i18n/client/DateTimeParse_en_Test.java	(revision 5191)
+++ test/com/google/gwt/i18n/client/DateTimeParse_en_Test.java	(working copy)
@@ -638,4 +638,25 @@
     assertTrue(date.getDate() == 02);
   }
 
+  public void testInvalidDayAndMonth() {
+    DateTimeFormat fmt = DateTimeFormat.getFormat("MM/dd/yyyy");
+    try {
+      fmt.parseStrict("00/22/1999");
+      fail("Should have thrown an exception on failure to parse");
+    } catch (IllegalArgumentException e) {
+      // Success
+    }
+    try {
+      fmt.parseStrict("01/00/1999");
+      fail("Should have thrown an exception on failure to parse");
+    } catch (IllegalArgumentException e) {
+      // Success
+    }
+    try {
+      fmt.parseStrict("01/22/1999");
+      // success
+    } catch (IllegalArgumentException e) {
+      fail("Should succeed to parse");
+    }
+  }
 }
Index: src/com/google/gwt/i18n/client/DateTimeFormat.java
===================================================================
--- src/com/google/gwt/i18n/client/DateTimeFormat.java	(revision 5191)
+++ src/com/google/gwt/i18n/client/DateTimeFormat.java	(working copy)
@@ -1705,6 +1705,9 @@
       case 'y': // 'y' - YEAR
         return subParseYear(text, pos, start, value, part, cal);
       case 'd': // 'd' - DATE
+        if (value <= 0) {
+          return false;
+        }
         cal.setDayOfMonth(value);
         return true;
       case 'S': // 'S' - FRACTIONAL_SECOND
@@ -1823,10 +1826,11 @@
       }
       cal.setMonth(value);
       return true;
-    } else {
+    } else if (value > 0) {
       cal.setMonth(value - 1);
       return true;
     }
+    return false;
   }
 
   /**
