Record
in package
日付情報を保持するクラス
Table of Contents
Properties
Methods
- __construct() : mixed
- parseStr() : Record
- 日付文字列からインスタンスを生成します
- toDateTime() : DateTime
- DateTimeインスタンスを取得します
Properties
$day
public
int
$day
日
$hour
public
int
$hour
時
$minute
public
int
$minute
分
$month
public
int
$month
月
$second
public
int
$second
秒
$year
public
int
$year
年
Methods
__construct()
public
__construct([int $year = 1 ][, int $month = 1 ][, int $day = 1 ][, int $hour = 0 ][, int $minute = 0 ][, int $second = 0 ]) : mixed
Parameters
- $year : int = 1
-
年
- $month : int = 1
-
月
- $day : int = 1
-
日
- $hour : int = 0
-
時
- $minute : int = 0
-
分
- $second : int = 0
-
秒
parseStr()
日付文字列からインスタンスを生成します
public
static parseStr(string $parseFormat, string $dateTime) : Record
Parameters
- $parseFormat : string
-
パース文字列
- $dateTime : string
-
日付文字列
Return values
Record —成功した場合はインスタンスを返します
toDateTime()
DateTimeインスタンスを取得します
public
toDateTime() : DateTime
Return values
DateTime —インスタンスを返します