Documentation

DateCaster
in package

Casts DateTimeInterface related classes to array representation.

Tags
author

Dany Maillard danymaillard93b@gmail.com

final

Table of Contents

PERIOD_LIMIT  = 3
castDateTime()  : mixed
castInterval()  : mixed
castPeriod()  : mixed
castTimeZone()  : mixed
formatDateTime()  : string
formatInterval()  : string
formatSeconds()  : string

Constants

Methods

castDateTime()

public static castDateTime(DateTimeInterface $d, array<string|int, mixed> $a, Stub $stub, bool $isNested, int $filter) : mixed
Parameters
$d : DateTimeInterface
$a : array<string|int, mixed>
$stub : Stub
$isNested : bool
$filter : int
Return values
mixed

castInterval()

public static castInterval(DateInterval $interval, array<string|int, mixed> $a, Stub $stub, bool $isNested, int $filter) : mixed
Parameters
$interval : DateInterval
$a : array<string|int, mixed>
$stub : Stub
$isNested : bool
$filter : int
Return values
mixed

castPeriod()

public static castPeriod(DatePeriod $p, array<string|int, mixed> $a, Stub $stub, bool $isNested, int $filter) : mixed
Parameters
$p : DatePeriod
$a : array<string|int, mixed>
$stub : Stub
$isNested : bool
$filter : int
Return values
mixed

castTimeZone()

public static castTimeZone(DateTimeZone $timeZone, array<string|int, mixed> $a, Stub $stub, bool $isNested, int $filter) : mixed
Parameters
$timeZone : DateTimeZone
$a : array<string|int, mixed>
$stub : Stub
$isNested : bool
$filter : int
Return values
mixed

formatDateTime()

private static formatDateTime(DateTimeInterface $d[, string $extra = '' ]) : string
Parameters
$d : DateTimeInterface
$extra : string = ''
Return values
string

formatInterval()

private static formatInterval(DateInterval $i) : string
Parameters
$i : DateInterval
Return values
string

formatSeconds()

private static formatSeconds(string $s, string $us) : string
Parameters
$s : string
$us : string
Return values
string

Search results