文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>strtotime将文本日期时间解析为Unix时间戳

strtotime将文本日期时间解析为Unix时间戳

时间:2006-09-08  来源:me09

[color="#02368d"]strtotime将文本日期时间解析为Unix时间戳
http://blog.chinaunix.net/u/13329/showart.php?id=165832
echo strtotime("2006-01-09 08:10");
echo strtotime("now");
echo strtotime("10 September 2000");
echo strtotime("+1 day");
echo strtotime("+1 week");
echo strtotime("+1 week 2 days 4 hours 2 seconds");
echo strtotime("next Thursday");
echo strtotime("last Monday");
?>
.今日日期号
$days=date('d',strtotime('now'));  //2006-09-06
.当前月月初
echo $currMBegin=date("Y-m",    strtotime('now'))."-01  ";
.本月月末
echo $currMEnd  =date("Y-m-d",  strtotime("next month -$days day"));
.下月月初
echo $nextMBegin=date("Y-m",    strtotime('next month'))."-01";
.下月月底
echo $nextMEnd  =date("Y-m-d",  strtotime("+2 months -$days day"));
2006-09-01  2006-09-30
2006-10-01  2006-10-31
               
               
               

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载