| 
        
            DateTimeImmutable::setDate日付を設定する 説明
   #[\NoDiscard]
   public DateTimeImmutable DateTimeImmutable::setDate(int  
  $year, int $month, int $day)DateTimeImmutable オブジェクトの現在の日付を、指定された日付にします。 指定した日付を設定した、新しい DateTimeImmutable オブジェクトを返します。 パラメータ
 戻り値変更されたデータを持つ、新しい DateTimeImmutable オブジェクトを返します。 例例1 DateTimeImmutable::setDate の例 オブジェクト指向型 上の例の出力は以下となります。 2001-02-03 例2 範囲を超えた値が親の値に加算される例 上の例の出力は以下となります。 2001-02-28 2001-03-01 2002-02-03 参考
  |