DateConverterResult
Class DateConverterResult
Table of Contents
Constants
- TYPE_CALENDAR = 'CALENDAR'
- TYPE_DAYOFWEEK = 'DAYOFWEEK'
- TYPE_MODIFIER = 'MODIFIER'
- TYPE_PARTOFDAY = 'PARTOFDAY'
- TYPE_RELATIVE = 'RELATIVE'
- TYPE_UNKNOWN = 'UNKNOWN'
Methods
- __construct() : mixed
- DateConverterResult constructor.
- getDate() : DateTime|null
- Date from the text
- getMetricModifier() : array<string|int, mixed>
- Get recognition metric modifier
- getMetrics() : array<string|int, mixed>
- Get recognition metrics
- getText() : string
- The string used to build the date
- getTextLength() : int
- Length of string used to build the date
- getTextPosition() : int
- Position of string used to build the date
- getType() : string
- Get primary recognition type
Constants
TYPE_CALENDAR
public
mixed
TYPE_CALENDAR
= 'CALENDAR'
TYPE_DAYOFWEEK
public
mixed
TYPE_DAYOFWEEK
= 'DAYOFWEEK'
TYPE_MODIFIER
public
mixed
TYPE_MODIFIER
= 'MODIFIER'
TYPE_PARTOFDAY
public
mixed
TYPE_PARTOFDAY
= 'PARTOFDAY'
TYPE_RELATIVE
public
mixed
TYPE_RELATIVE
= 'RELATIVE'
TYPE_UNKNOWN
public
mixed
TYPE_UNKNOWN
= 'UNKNOWN'
Methods
__construct()
DateConverterResult constructor.
public
__construct(DateTime $date, mixed $matchParams[, mixed $type = self::TYPE_UNKNOWN ][, array<string|int, mixed> $metrics = array() ][, array<string|int, mixed> $metricModifier = array() ]) : mixed
Parameters
- $date : DateTime
- $matchParams : mixed
- $type : mixed = self::TYPE_UNKNOWN
- $metrics : array<string|int, mixed> = array()
- $metricModifier : array<string|int, mixed> = array()
getDate()
Date from the text
public
getDate() : DateTime|null
Return values
DateTime|nullgetMetricModifier()
Get recognition metric modifier
public
getMetricModifier() : array<string|int, mixed>
Return values
array<string|int, mixed>getMetrics()
Get recognition metrics
public
getMetrics() : array<string|int, mixed>
Return values
array<string|int, mixed>getText()
The string used to build the date
public
getText() : string
Return values
stringgetTextLength()
Length of string used to build the date
public
getTextLength() : int
Return values
intgetTextPosition()
Position of string used to build the date
public
getTextPosition() : int
Return values
intgetType()
Get primary recognition type
public
getType() : string