DateRange
in package
Class DateRange
Table of Contents
Properties
- $date : string
Methods
- __construct() : mixed
- DateRange constructor.
- __toString() : string
- getFrom() : DateTimeImmutable|null
- getFromProp() : DateProp
- getUntil() : DateTimeImmutable|null
- getUntilProp() : DateProp
- propFrom() : DateProp
- A DateProp built from a RAW date segment so precision survives (jikan#486). DateProp::parse already knows the three precisions — a bare year yields null day/month, 'May, 1979' a null day, 'May 1, 1979' all three. Round-tripping through getFrom()/getUntil() destroyed that by padding a year-only date to 'YYYY-01-01'.
Properties
$date
private
string
$date
Methods
__construct()
DateRange constructor.
public
__construct(string $date) : mixed
Parameters
- $date : string
__toString()
public
__toString() : string
Return values
stringgetFrom()
public
getFrom() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetFromProp()
public
getFromProp() : DateProp
Return values
DatePropgetUntil()
public
getUntil() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetUntilProp()
public
getUntilProp() : DateProp
Return values
DateProppropFrom()
A DateProp built from a RAW date segment so precision survives (jikan#486). DateProp::parse already knows the three precisions — a bare year yields null day/month, 'May, 1979' a null day, 'May 1, 1979' all three. Round-tripping through getFrom()/getUntil() destroyed that by padding a year-only date to 'YYYY-01-01'.
private
propFrom(string $segment) : DateProp
Parameters
- $segment : string