使用php获取下一个第15天和/或第30天的日期?

I require to get the dates of the upcoming 15th and 30ths of the next months as for the current date. (If February is within range it must be 28/29th of course).

Can I do this using mktime/strtotime or maybe using another method?

I got this but of course this is for only get the last day of this and next month. I need the upcoming 15ths and 30ths instead.

$cuota1 = date('t-m-Y', strtotime('+15 days'));
    return $cuota1;

$cuota2 = date('t-m-Y', strtotime('+30 days'));
    return $cuota2;

$cuota3 = date('t-m-Y', strtotime('+45 days'));
    return $cuota3;

Thanks in advance.

查看全部
doubeng9567
doubeng9567
2015/11/04 15:40
  • date
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

3个回复