これを分けてみましょう:
$deldate5 = date("d.m.Y., l", strtotime("today + 5 day", time()));
これは次の 2 つのことを行っています。
strtotime
: UNIX タイムスタンプ (エポックからの秒数) を作成します。
date
: 出力をフォーマットします。
あなたの問題は、タイムスタンプ(1.)を作成するのではなく、出力(2.)に関連しています。それでは、これを分けてみましょう:
$timestamp = strtotime("today + 5 day", time());
$formatted = date("d.m.Y., l", $timestamp);
ここで必要なのは、次のコード行を処理することだけです。
$formatted = date("d.m.Y., l", $timestamp);
date
Docs関数の書式設定パラメーターは次のとおりです。
d - Day of the month, 2 digits with leading zeros
m - Numeric representation of a month, with leading zeros
Y - A full numeric representation of a year, 4 digits
l - A full textual representation of the day of the week
l
(小文字の L) は出力にロケールを必要とするため、Docs が提供する類似のフォーマット パラメータを見てみましょstrftime
う。
%A - A full textual representation of the day.
date
したがって、 からに変更するのはほんの小さなステップstrftime
です。
$formatted = strftime("%d.%m.%Y., %A", $timestamp);
お役に立てれば。