PHP Трейт Cake\Chronos\Traits\FormattingTrait

Expects implementing classes to define static::$toStringFormat
Показать файл Открыть проект

Открытые методы

Метод Описание
__toString ( ) : string Format the instance as a string using the set format
resetToStringFormat ( ) : void Reset the format used to the default when type juggling a ChronosInterface instance to a string
setToStringFormat ( string $format ) : void Set the default format used when type juggling a ChronosInterface instance to a string
toAtomString ( ) : string Format the instance as ATOM
toCookieString ( ) : string Format the instance as COOKIE
toDateString ( ) : string Format the instance as date
toDateTimeString ( ) : string Format the instance as date and time
toDayDateTimeString ( ) : string Format the instance with day, date and time
toFormattedDateString ( ) : string Format the instance as a readable date
toIso8601String ( ) : string Format the instance as ISO8601
toQuarter ( boolean $range = false ) : mixed Returns the quarter
toRfc1036String ( ) : string Format the instance as RFC1036
toRfc1123String ( ) : string Format the instance as RFC1123
toRfc2822String ( ) : string Format the instance as RFC2822
toRfc3339String ( ) : string Format the instance as RFC3339
toRfc822String ( ) : string Format the instance as RFC822
toRfc850String ( ) : string Format the instance as RFC850
toRssString ( ) : string Format the instance as RSS
toTimeString ( ) : string Format the instance as time
toUnixString ( ) : string Returns a UNIX timestamp.
toW3cString ( ) : string Format the instance as W3C
toWeek ( ) : integer

Описание методов

__toString() публичный Метод

Format the instance as a string using the set format
public __toString ( ) : string
Результат string

resetToStringFormat() публичный статический Метод

Reset the format used to the default when type juggling a ChronosInterface instance to a string
public static resetToStringFormat ( ) : void
Результат void

setToStringFormat() публичный статический Метод

Set the default format used when type juggling a ChronosInterface instance to a string
public static setToStringFormat ( string $format ) : void
$format string The format to use in future __toString() calls.
Результат void

toAtomString() публичный Метод

Format the instance as ATOM
public toAtomString ( ) : string
Результат string

toCookieString() публичный Метод

Format the instance as COOKIE
public toCookieString ( ) : string
Результат string

toDateString() публичный Метод

Format the instance as date
public toDateString ( ) : string
Результат string

toDateTimeString() публичный Метод

Format the instance as date and time
public toDateTimeString ( ) : string
Результат string

toDayDateTimeString() публичный Метод

Format the instance with day, date and time
public toDayDateTimeString ( ) : string
Результат string

toFormattedDateString() публичный Метод

Format the instance as a readable date
public toFormattedDateString ( ) : string
Результат string

toIso8601String() публичный Метод

Format the instance as ISO8601
public toIso8601String ( ) : string
Результат string

toQuarter() публичный Метод

Returns the quarter
public toQuarter ( boolean $range = false ) : mixed
$range boolean Range.
Результат mixed 1, 2, 3, or 4 quarter of year or array if $range true

toRfc1036String() публичный Метод

Format the instance as RFC1036
public toRfc1036String ( ) : string
Результат string

toRfc1123String() публичный Метод

Format the instance as RFC1123
public toRfc1123String ( ) : string
Результат string

toRfc2822String() публичный Метод

Format the instance as RFC2822
public toRfc2822String ( ) : string
Результат string

toRfc3339String() публичный Метод

Format the instance as RFC3339
public toRfc3339String ( ) : string
Результат string

toRfc822String() публичный Метод

Format the instance as RFC822
public toRfc822String ( ) : string
Результат string

toRfc850String() публичный Метод

Format the instance as RFC850
public toRfc850String ( ) : string
Результат string

toRssString() публичный Метод

Format the instance as RSS
public toRssString ( ) : string
Результат string

toTimeString() публичный Метод

Format the instance as time
public toTimeString ( ) : string
Результат string

toUnixString() публичный Метод

Returns a UNIX timestamp.
public toUnixString ( ) : string
Результат string UNIX timestamp

toW3cString() публичный Метод

Format the instance as W3C
public toW3cString ( ) : string
Результат string

toWeek() публичный Метод

public toWeek ( ) : integer
Результат integer