strtotimeの指定

本日 を基準にするとstrtotimeは次のようになります。

[参考記事] strtotimeでmonthを使用するときの注意点

昨日 strtotime("yesterday")
明日 strtotime("tomorrow")
10日前 strtotime("-10 day")
strtotime(date("Y-m-d")." -10 day")
10日後 strtotime("+10 day")
strtotime(date("Y-m-d")." +10 day")
1週間前 strtotime("-1 week")
strtotime(date("Y-m-d")." -1 week")
1週間後 strtotime("+1 week")
strtotime(date("Y-m-d")." +1 week")
前回の日曜日 strtotime("last Sunday")
次回の日曜日 strtotime("next Sunday")
先々月 strtotime(date("Y-m-01")." -2 month")
先月 strtotime(date("Y-m-01")." -1 month")
来月 strtotime(date("Y-m-01")." +1 month")
再来月 strtotime(date("Y-m-01")." +2 month")

関連記事

スポンサーリンク

top 現在のシステム状況を表示する

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る