« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 1 of about 1 for someDate (0.000 sec.)
DateInterval::__construct — 新しい DateInterval オブジェクトを作成する | PHP 8.... 9414
DateInterval::__construct (PHP 5 >= 5.3.0, PHP 7, PHP 8) DateInterval::__construct — 新しい DateInterval オブジェクトを作成する 説明 public function DateInterval::__construct ( string $duration ) 新しい DateInterval オブジェクトを作成します ... D と組み合わせて使えるようになりました。 例 例1 DateInterval オブジェクトを作成して使う例 <?php // Create a specific date $someDate = \DateTime :: createFromFormat ( "Y-m-d H:i" , "2022-08-25 14:18" ); // Create interval $interval = new \DateInterval ( " ... P7D" ); // Add interval $someDate -> add ( $interval ); // Convert interval to string echo $interval -> format ( "%d" ); 上の例の出力は以下となります。 7 例 ...
https://man.mtool.work/php/8.3/dateinterval.construct.html
PREV 1 NEXT