LoginSignup
5
5

More than 5 years have passed since last update.

Datetimeで月末最終日を取得する

Posted at

以下の方法で一発。

$lastday = new Datetime('last day of now');

//時間を指定する場合
$lastday = new Datetime('last day of now 12:00');

5
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5