These time functions are put out, the use of the method needless to say! What do not understand the place can be in the following message, I will promptly reply to, make a friend ~
The code is as follows |
Copy Code |
Take two days of the day difference function Subday ($ntime, $ctime) { $dayst = 3600 * 24; $cday = Ceil (($ntime-$ctime)/$dayst); return $cday; } A few days after the current time, the number of days increases in units of 1 function Addday ($ntime, $aday) { $dayst = 3600 * 24; $oktime = $ntime + ($aday * $dayst); return $oktime; } Take a day of the week
function Addspeday ($day =0) { $day = Isset ($day)? Intval ($day): 0; $daynum = Date (' W ') – $day; $oktime = Time () – (3600 * $daynum); return $oktime; } #附php取当前时间的方法 Take the current time, in the format 2009-10-23 14:20:35 function Getdatetimemk ($mktime) { Return mydate (' y-m-d h:i:s ', $mktime); } Take the current time, in the format 2009-10-23 function Getdatemk ($mktime) { Return MyDate ("y-m-d", $mktime); } ?> |
http://www.bkjia.com/PHPjc/631277.html www.bkjia.com true http://www.bkjia.com/PHPjc/631277.html techarticle These time functions are put out, the use of the method needless to say! What do not understand the place can be in the following message, I will promptly reply to, make a friend ~ code as follows copy Generation ...