Util
in package
\DateTimeクラスに関するUtilを提供するクラス
Table of Contents
Properties
- $dateTime : DateTimeInterface
Methods
- __construct() : mixed
- eq() : bool
- 自身の日付情報と入力の日付情報が同じか確認します
- ge() : bool
- 自身の日付が入力日付以上か確認します($this >= $dateTime)
- gt() : bool
- 自身の日付が入力日付より大きい確認します($this > $dateTime)
- isFeature() : bool
- 日付が未来かどうか確認します
- isPast() : bool
- 日付が過去かどうか確認します
- le() : bool
- 自身の日付が入力日付以下か確認します($this <= $dateTime)
- lt() : bool
- 自身の日付が入力日付より小さいか確認します($this < $dateTime)
- ne() : bool
- 自身の日付情報と入力の日付情報が異なるか確認します
Properties
$dateTime
private
DateTimeInterface
$dateTime
Methods
__construct()
public
__construct(DateTimeInterface $dateTime) : mixed
Parameters
- $dateTime : DateTimeInterface
eq()
自身の日付情報と入力の日付情報が同じか確認します
public
eq(DateTimeInterface $dateTime) : bool
Parameters
- $dateTime : DateTimeInterface
-
比較対象の日付情報を渡します
Return values
bool —同じ場合はtrueを、それ以外の場合はfalseを返します
ge()
自身の日付が入力日付以上か確認します($this >= $dateTime)
public
ge(DateTimeInterface $dateTime) : bool
Parameters
- $dateTime : DateTimeInterface
-
比較対象の日付情報を渡します
Return values
bool —以上の場合はtrueを、それ以外の場合はfalseを返します
gt()
自身の日付が入力日付より大きい確認します($this > $dateTime)
public
gt(DateTimeInterface $dateTime) : bool
Parameters
- $dateTime : DateTimeInterface
-
比較対象の日付情報を渡します
Return values
bool —大きい場合はtrueを、それ以外の場合はfalseを返します
isFeature()
日付が未来かどうか確認します
public
isFeature() : bool
Return values
bool —未来の場合はtrueを、それ以外の場合はfalseを返します
isPast()
日付が過去かどうか確認します
public
isPast() : bool
Return values
bool —過去の場合はtrueを、それ以外の場合はfalseを返します
le()
自身の日付が入力日付以下か確認します($this <= $dateTime)
public
le(DateTimeInterface $dateTime) : bool
Parameters
- $dateTime : DateTimeInterface
-
比較対象の日付情報を渡します
Return values
bool —以下の場合はtrueを、それ以外の場合はfalseを返します
lt()
自身の日付が入力日付より小さいか確認します($this < $dateTime)
public
lt(DateTimeInterface $dateTime) : bool
Parameters
- $dateTime : DateTimeInterface
-
比較対象の日付情報を渡します
Return values
bool —小さい場合はtrueを、それ以外の場合はfalseを返します
ne()
自身の日付情報と入力の日付情報が異なるか確認します
public
ne(DateTimeInterface $dateTime) : bool
Parameters
- $dateTime : DateTimeInterface
-
比較対象の日付情報を渡します
Return values
bool —異なる場合はtrueを、それ以外の場合はfalseを返します