Commit df267781 by Frederick

mcDate::checkIfFirstIsBefore Bug gelöst

1 parent f89cef7a
Showing with 3 additions and 10 deletions
......@@ -48,18 +48,11 @@ class mcDate {
public static function checkIfFirstIsBefore($param_DateBefore, $param_DateAfter) {
if(mcDate::check8601Date($param_DateBefore) && mcDate::check8601Date($param_DateAfter)) {
$DateBefore_jahr = substr($param_DateBefore, 0, 4);
$DateBefore_monat = substr($param_DateBefore, 5, 2);
$DateBefore_tag = substr($param_DateBefore, 8, 2);
$DateAfter_jahr = substr($param_DateAfter, 0, 4);
$DateAfter_monat = substr($param_DateAfter, 5, 2);
$DateAfter_tag = substr($param_DateAfter, 8, 2);
$DateBefore = mktime(null, null, null, substr($param_DateBefore, 5, 2), substr($param_DateBefore, 8, 2), substr($param_DateBefore, 0, 4));
$DateAfter = mktime(null, null, null, substr($param_DateAfter, 5, 2), substr($param_DateAfter, 8, 2), substr($param_DateAfter, 0, 4));
if($DateBefore_jahr <= $DateAfter_jahr
&& $DateBefore_monat <= $DateAfter_monat
&& $DateBefore_tag <= $DateAfter_tag) {
if($DateBefore <= $DateAfter) {
return true;
} else {
return false;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!