❮ PHP date/timeリファレンス
例
現在のローカルdate/time情報を返します。
<?php
print_r(getdate());
?>
定義と使用法
getdate()関数は、タイムスタンプまたは現在のローカルdate/timeのdate/time情報を返します。
構文
<div>getdate(<em>timestamp)</em></div>
パラメータ値
|
パラメータ |
説明 |
| timestamp |
Optional 整数のUnixタイムスタンプを指定します。デフォルトは現在の現地時間です(time()) |
Technical Details
| Return Value: |
タイムスタンプに関連する情報を含む連想配列を返します。
- [seconds] - seconds
- [minutes] - minutes
- [hours] - hours
- [mday] - day of the month
- [wday] - day of the week (0=Sunday, 1=Monday,...)
- [mon] - month
- [year] - year
- [yday] - day of the year
- [weekday] - name of the weekday
- [month] - name of the month
- [0] - seconds since Unix Epoch
|
|
PHP バージョン: |
4+ |
❮ PHP date/timeリファレンス