Time
extends Component
in package
implements
Stringable
FinalYes
Tags
Table of Contents
Interfaces
- Stringable
Constants
- FORMAT = 'h:i A'
- FORMAT_24_HOUR = 'H:i'
Properties
- $datetime : DateTime
- $hashCode : int
- $hashCounter : int
Methods
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- __destruct() : mixed
- __get() : mixed
- __toString() : mixed
- {@inheritdoc}
- extends() : bool
- format() : string
- Formats the time according to a certain format
- getReflection() : ReflectionClass
- init() : mixed
Constants
FORMAT
public
mixed
FORMAT
= 'h:i A'
FORMAT_24_HOUR
public
mixed
FORMAT_24_HOUR
= 'H:i'
Properties
$datetime
private
DateTime
$datetime
$hashCode
private
int
$hashCode
$hashCounter
private
static int
$hashCounter
= 0
Methods
__call()
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
__construct()
public
__construct([string $time = "now" ]) : mixed
Parameters
- $time : string = "now"
Tags
__destruct()
public
__destruct() : mixed
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
__toString()
{@inheritdoc}
public
__toString() : mixed
Tags
extends()
public
extends(ReflectionClass $reflector) : bool
Parameters
- $reflector : ReflectionClass
Return values
boolformat()
Formats the time according to a certain format
public
format([string|null $format = self::FORMAT ]) : string
Parameters
- $format : string|null = self::FORMAT
-
The format to use in formatting the time
Return values
string —The formatted time
getReflection()
public
getReflection() : ReflectionClass
Return values
ReflectionClassinit()
protected
init() : mixed