PHP日期与时间
发布时间:2020-12-13 21:23:28 所属栏目:PHP教程 来源:网络整理
导读:1、date string date ( string $format [,int $timestamp ] ) ? echo date('Y') . 'br/';// 2016 echo date('y') . 'br/';// 16 echo '------br/'; echo date('m') . 'br/';// 03 echo date('M') . 'br/';// Mar,大写M表示月份的3个缩写字符 echo date('n')
1、date string date ( string $format [,int $timestamp ] ) ? echo date('Y') . '<br/>';// 2016 2、mktime() ? ??????mktime为指定时间生成时间戳,原型: int mktime ([ int $hour = date("H") [,int $minute = date("i") [,int $second = date("s") [,int $month = date("n") [,int $day = date("j") [,int $year = date("Y") [,int $is_dst = -1]]]]]]] ) ????? $tomorrow = mktime(0,date("m"),date("d")+1,date("Y")); 3、strtotime() $d=strtotime("10:38pm April 15 2015"); ? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |