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