iQuery插件datepicker获取的时间函数为"月月/天天/年年年年"(以04/21/2015为例)的形式
(1)转化为2015-21-04形式:$start = date('Y-m-d',strtotime($start1));
(2)计算两个时间所差天数:$days=floor((strtotime($end)-strtotime($start))/86400);
(3)求所求日期的下一天:$nextday=date("Y-m-d",strtotime("$tday +1 day"));
(4)求所求日期的一周后:$nextweekday=date("Y-m-d",strtotime("$tday+1 week"));
(5)求下个星期二:date("Y-m-d",strtotime("next Thursday"));
(6)上个周一: date("Y-m-d",strtotime("last Monday"));
(7)一个月前: date("Y-m-d",strtotime("last month"));
(8)一个月后: date("Y-m-d",strtotime("+1 month"));

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2023-03-29
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
猜你喜欢
  • 2021-08-02
  • 2022-02-28
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案