0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【php】相対的な日付の書き方

Last updated at Posted at 2023-03-24

メモです。

date('Y/m/d'); //今日 "2023/03/24"
date('Y/m/d', strtotime('first day of this month')); //今月1日 "2023/03/01"
date('Y/m/d', strtotime('first day of next month')); //来月1日 "2023/04/01"
date('Y/m/d', strtotime('last day of previous month')); //先月末日 "2023/02/28"

参考:

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?