psIsSameDay() Check if two timestamps are on the same day
Description:
This returns true if timestamp 1 and timestamp 2 are on the same day of the year
Usage:
psIsSameDay($ts1,{$ts2}); $ts1 is a linux time $ts2 is a linux time, note: ts2 is optional, if not used then current time() is used
Example:
Code:
function psIsSameDay($ts1,$ts2 = "") { if ($ts2 == "") { $ts2 = time(); } $f = false; if ( date("z-Y",$ts1) == date("z-Y",$ts2) ) { $f = true; } return $f; }
Changlelog:
|
|