PHP Salt


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

Version: 2.33.2
Last Build: December 29, 2023 20:28pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

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

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