7/1/2005
の代わりに6/30/2005
を返すように機能すると予想しました。php:strtotime( "12/31/2004 + 6月")); 6月の最終日を返さない
print date("m/d/Y", strtotime("12/31/2004 +6 month"));
同様に、print date("m/d/Y", strtotime("1/31/2011 +1 month"))
戻り03/03/2011
一方は、2/28/2011
を返したいです。
追加された月の最後の日を表示するにはまっすぐな方法があるのですか?
私が正しく覚えている場合、 'strtotime'はヨーロピアンスタイルの日付で動作します。 '31/1/2011'などを試してください –