1,获取时间字符串
var nowdatestr = new Date().toLocaleDateString(); 获取时间格式如:2022/10/10
2,计算时间差
$nowdate=date('Y-m-d H:i:s',time()); $ret['leftdays']=floor((strtotime($termdate)-strtotime($nowdate))/86400); $termdate = date('Y-m-d H:i:s',strtotime('+1 year'));
标签:strtotime,时间差,0066,获取,字符串,date,JS From: https://www.cnblogs.com/eliteboy/p/16778935.html