PHP Salt


A little dash of PHP... my collection of php functions

Version: 2.13.2
Last Build: October 09, 2016 21:15pm (PST)

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:


See Also

And a shot out to:

LinuxSimple - www.linuxsimple.com
PHP - php.net
Fedora Server - getfedora.com
Shameless ads to pay for site