PHP Salt


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

Version: 2.14.1
Last Build: March 10, 2017 13:28pm (PST)

psTime()
Returns date and time in simple format


Description:

This is just a wrapper for: date("m/d/y") and date("g:i a")


Usage:

$dt = psDate([UNIX_TIME])
$dt = psTime([UNIX_TIME])


Example:

	$d = psDate();		// now
$t = psTime(); // now
print "Date: $d Time: $t";




Code:

function psDate($ts="")
{
if ($ts == "") { $ts = time(); }
return date("m/d/y",$ts);
}

function psTime($ts="")
{
if ($ts == "") { $ts = time(); }
return date("g:i a",$ts);
}



Changlelog:

02/26/2015 : Added psTime() for simple time
See Also

And a shot out to:

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