From c73b2daa7221e873f80263f09e9985c479e0029e Mon Sep 17 00:00:00 2001
From: goujonpa <goujonpa@gmail.com>
Date: Thu, 19 Jun 2014 02:29:36 +0200
Subject: [PATCH] fix date

---
 class/datefield.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/class/datefield.php b/class/datefield.php
index 2af229e..939ab0b 100644
--- a/class/datefield.php
+++ b/class/datefield.php
@@ -16,8 +16,8 @@ class DateField extends Field
         $ret = true;
         $this->value = $_POST[$this->name];
         $year = substr($this->value, 0, 4);
-        $month = substr($this->value, 6, 2);
-        $day = substr($this->value, 9, 2);
+        $month = substr($this->value, 5, 2);
+        $day = substr($this->value, 8, 2);
         $today = getdate();
         if ($year < $today[year]) {
             $ret = false;
@@ -31,8 +31,8 @@ class DateField extends Field
 
     public function show() {
         $year = substr($this->value, 0, 4);
-        $month = substr($this->value, 6, 2);
-        $day = substr($this->value, 9, 2);
+        $month = substr($this->value, 5, 2);
+        $day = substr($this->value, 8, 2);
         $html = $day.'-'.$month.'-'.$year;
         return $html; 
     }
-- 
GitLab