Documentation

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

Methods

__construct()

DateRange constructor.

public __construct(string $date) : mixed
Parameters
$date : string

__toString()

public __toString() : string
Return values
string

getFrom()

public getFrom() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getUntil()

public getUntil() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

propFrom()

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
Return values
DateProp
On this page

Search results