Differences From Artifact [6668e725cc]:

To Artifact [6a6471aec6]:


41
42
43
44
45
46
47
48





49










50

51
52

53
54
55
56
57
58
59
..
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
        $date = strtolower($date);
        return $date;
    }

    static public function sqliteDateToFrench($d, $short = false)
    {
        if (strlen($d) == 10 || $short)
            return \DateTime::createFromFormat('Y-m-d', substr($d, 0, 10))->format('d/m/Y');





        elseif (strlen($d) == 16)










            return \DateTime::createFromFormat('Y-m-d H:i', $d)->format('d/m/Y H:i');

        else
            return \DateTime::createFromFormat('Y-m-d H:i:s', $d)->format('d/m/Y H:i');

    }

    static public function makeTimestampFromForm($d)
    {
        return mktime($d['h'], $d['min'], 0, $d['m'], $d['d'], $d['y']);
    }

................................................................................
            return false;

        return true;
    }

    static public function checkDateTime($str)
    {
        if (!preg_match('!^(\d{4}-\d{2}-\d{2}) (\d{2}):(\d{2})(?::(\d{2}))?$!', $str, $match))
            return false;

        if (!self::checkDate($match[1]))
            return false;

        if ((int) $match[2] < 0 || (int) $match[2] > 23)
            return false;







<
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
|
>

<
>







 







|







41
42
43
44
45
46
47

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

67
68
69
70
71
72
73
74
..
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
        $date = strtolower($date);
        return $date;
    }

    static public function sqliteDateToFrench($d, $short = false)
    {
        if (strlen($d) == 10 || $short)

        {
            $d = substr($d, 0, 10);
            $f = 'Y-m-d';
            $f2 = 'd/m/Y';
        }
        elseif (strlen($d) == 16)
        {
            $f = 'Y-m-d H:i';
            $f2 = 'd/m/Y H:i';
        }
        else
        {
            $f = 'Y-m-d H:i:s';
            $f2 = 'd/m/Y H:i';
        }
        
        if ($dt = \DateTime::createFromFormat($f, $d))
            return $dt->format($f2);
        else

            return $d;
    }

    static public function makeTimestampFromForm($d)
    {
        return mktime($d['h'], $d['min'], 0, $d['m'], $d['d'], $d['y']);
    }

................................................................................
            return false;

        return true;
    }

    static public function checkDateTime($str)
    {
        if (!preg_match('!^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})!', $str, $match))
            return false;

        if (!self::checkDate($match[1]))
            return false;

        if ((int) $match[2] < 0 || (int) $match[2] > 23)
            return false;