DateTime
extends AbstractHelper
in package
View helper for formatting dates and times
Tags
Table of Contents
- $converter : Converter
- Date converter
- __call() : mixed
- By default, proxy method calls to the converter object.
- __construct() : mixed
- Constructor
- extractYear() : string|bool
- Extract a year from a human-readable date. Return false if no year can be found.
- getDisplayDateFormat() : string
- Builds an alphabetical help string based on the default display date format.
Properties
$converter
Date converter
protected
Converter
$converter
Methods
__call()
By default, proxy method calls to the converter object.
public
__call(string $methodName, array<string|int, mixed> $params) : mixed
Parameters
- $methodName : string
-
The name of the called method.
- $params : array<string|int, mixed>
-
Array of passed parameters.
Return values
mixed —__construct()
Constructor
public
__construct(Converter $converter) : mixed
Parameters
- $converter : Converter
-
Date converter
Return values
mixed —extractYear()
Extract a year from a human-readable date. Return false if no year can be found.
public
extractYear(string $date) : string|bool
Parameters
- $date : string
-
Date to reformat
Return values
string|bool —getDisplayDateFormat()
Builds an alphabetical help string based on the default display date format.
public
getDisplayDateFormat() : string