Hvad er forskellen paa:
function getboo($year1, $month1, $day1, $hours1, $minutes1, $seconds1, $year2, $month2, $day2, $hours2, $minutes2, $seconds2) {
if ($year1 == $year2 && $month1 == $month2 && $day1 == $day2 && $hours1 == $hours2 && $minutes1 == $minutes2 && $seconds1 == $seconds2) {
return true;
}
else {
if ($year1 > $year2) {
return true;
}
elseif($year1 == $year2) {
if ($month1 > $month2) {
return true;
}
elseif($month1 == $month2) {
if ($day1 > $day2) {
return true;
}
elseif($day1 == $day2) {
if ($hours1 > $hours2) {
return true;
}
elseif($hours1 == $hours2) {
if ($minutes1 > $minutes2) {
return true;
}
elseif($minutes1 == $minutes2) {
if ($seconds1 >= $seconds2) {
return true;
}
else {
return false;
}
}
else {
return false;
}
}
else {
return false;
}
}
else {
return false;
}
}
else {
return false;
}
}
else {
return false;
}
}
}
og:
function getboo($year1, $month1, $day1, $hours1, $minutes1, $seconds1, $year2, $month2, $day2, $hours2, $minutes2, $seconds2) {
return mktime($hours1, $minutes1, $seconds1, $month1, $day1, $year1) >= mktime($hours2, $minutes2, $seconds2, $month2, $day2, $year2);
}
?