$FourteenDays = 86400 * 14;
$var = $FourteenDays - (strtotime($date2) - strtotime($date1));

Now if $var is > 0, 14 days has not passed.


Niklas

-----Original Message-----
From: Fredrik [mailto:[EMAIL PROTECTED] 
Sent: 12. maaliskuuta 2003 12:06
To: [EMAIL PROTECTED]
Subject: [PHP] date check


Hi

I want to check if  $var > 14 days or $var  < 14 days

($var = $date2  - $date1)

$date1 = "2003-01-16";
$date2 = "2003-03-16";


How can i check this?
Are there any functions for this or do i have to make one?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

###########################################
This message has been scanned by F-Secure Anti-Virus for Internet Mail. For
more information, connect to http://www.F-Secure.com/

###########################################
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to