Jump to content

[SOLVED] missing September


dbair

Recommended Posts

Any idea why dates go from august to october missing september?

 

where current month = July (07)

 

$curYM = date("Y-m");  // 2007-07

$nextMnth = date("Y-m", strtotime("+1 months")); // 2007-08

 

Both of the two below give back 2007-10

$twoMnth = date("Y-m", mktime(0,0,0,date('m')+2)); // 2007-10 - should be 2007-09

$twoMnth = date("Y-m", strtotime("+2 months")); // 2007-10 - should be 2007-09

 

Thanks in advance!

David

 

Link to comment
https://forums.phpfreaks.com/topic/62656-solved-missing-september/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.