<?php
$today= date('Y-m-d');
echo 'today: '.$today.'<br><br>';
$one_month = date('Y-m-d',strtotime('-1 month'));
echo '-1 month: '.$one_month.'<br><br>';
$three_month = date('Y-m-d',strtotime('-3 month'));
echo '-3 month: '.$three_month.'<br><br>';
$six_month = date('Y-m-d',strtotime('-6 month'));
echo '-6 month: '.$six_month.'<br><br>';
$on_year = date('Y-m-d',strtotime('-1 year'));
echo '-1 year: '.$on_year.'<br><br>';
$to_date = date('Y-m-d',strtotime('-1 day'));
echo 'to_date: '.$to_date.'<br><br>';
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论