PHP Salt


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

Version: 2.20.2
Last Build: October 16, 2017 12:40pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
file
graph
html
mail
math
misc
mobile
script
string
system
time
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