开发者

how do i display a date that is 2 weeks after a set date?

If I have a date such as 10/10/10, h开发者_如何学JAVAow do I display the date (in date format) 2 weeks after that? I think it has to do with strtotime, but I don't know how to write it. I'm looking at the php.net site and can't figure it out.


Try this

date('y/m/d', strtotime('+2 weeks', strtotime('10/10/10')));


I'm not 100% what you need, but we'll give it a try:

$defaultTime = strtotime('+2 week',strtotime('10/10/10'));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜