about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/getdate.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/time/getdate.c b/time/getdate.c
index eb7b0c7f87..c25a49d5a1 100644
--- a/time/getdate.c
+++ b/time/getdate.c
@@ -71,24 +71,24 @@ check_mday (int year, int mon, int mday)
 {
   switch (mon)
     {
-    case 1:
-    case 3:
-    case 5:
-    case 7:
-    case 8:
-    case 10:
-    case 12:
-      if (mday >= 1 && mday <= 31)
-	return 1;
-      break;
+    case 0:
+    case 2:
     case 4:
     case 6:
+    case 7:
     case 9:
     case 11:
+      if (mday >= 1 && mday <= 31)
+	return 1;
+      break;
+    case 3:
+    case 5:
+    case 8:
+    case 10:
       if (mday >= 1 && mday <= 30)
 	return 1;
       break;
-    case 2:
+    case 1:
       if (mday >= 1 && mday < (__isleap (year) ? 29 : 28))
 	return 1;
       break;