DateTimeImmutable::createFromMutable
与えられた DateTime オブジェクトをカプセル化した、新しいDateTimeImmutable のインスタンスを返す
&reftitle.description;
public static staticDateTimeImmutable::createFromMutable
DateTimeobject
&reftitle.parameters;
object
変更不能なバージョンに変換が必要な、
DateTime オブジェクト。
このオブジェクトは変更されませんが、
代わりに同じ日付、時刻、タイムゾーンの情報を含んだ
新しい DateTimeImmutable のインスタンスが作られます。
&reftitle.returnvalues;
新しい DateTimeImmutable インスタンスを返します。
&reftitle.changelog;
&Version;
&Description;
8.0.0
このメソッドは、現在呼び出されたクラスのインスタンスを返すようになりました。
これより前のバージョンでは、
新しい DateTimeImmutable のインスタンスを生成していました。
&reftitle.examples;
変更不能な日付オブジェクトを作る