Wednesday, 18 May 2011

Simple date differene

<?php
$start
= new DateTime('08-06-1995'); // DD-MM-YYYY
$end = new DateTime('22-11-1968');

if (
$start < $end) {
    echo
"Correct order";
} else {
    echo
"Incorrect order, end date is before the starting date";
}
?>

No comments:

Post a Comment

Source base installation of php, mysql and apache in ubuntu/ linux

Compile and Install a LAMP(Linux/Apache/MySQL/PHP) Server from Source In the last post, I described the method to install a LAMP ser...