WeeklyCalendarWindow
in package
FinalYes
One weekly open window expressed as local wall-clock start and end times on one weekday.
Table of Contents
Properties
Methods
- __construct() : mixed
- Create one weekly calendar window.
- between() : self
- Build one weekly calendar window from a weekday name/number and local start/end times.
- compareTo() : int
- Compare this window to another window using canonical weekday/start/end ordering.
- endDateTime() : DateTimeImmutable
- Return the concrete end datetime for the week that begins at the given Monday midnight.
- signature() : string
- Return a canonical key suitable for deduplication and merges.
- startDateTime() : DateTimeImmutable
- Return the concrete start datetime for the week that begins at the given Monday midnight.
Properties
$end read-only
public
WeeklyCalendarMoment
$end
$start read-only
public
WeeklyCalendarMoment
$start
Methods
__construct()
Create one weekly calendar window.
public
__construct(WeeklyCalendarMoment $start, WeeklyCalendarMoment $end) : mixed
Parameters
- $start : WeeklyCalendarMoment
- $end : WeeklyCalendarMoment
Tags
between()
Build one weekly calendar window from a weekday name/number and local start/end times.
public
static between(int|string $weekday, string $start, string $end) : self
Parameters
- $weekday : int|string
- $start : string
- $end : string
Return values
selfcompareTo()
Compare this window to another window using canonical weekday/start/end ordering.
public
compareTo(self $other) : int
Parameters
- $other : self
Return values
intendDateTime()
Return the concrete end datetime for the week that begins at the given Monday midnight.
public
endDateTime(DateTimeImmutable $weekStart) : DateTimeImmutable
Parameters
- $weekStart : DateTimeImmutable
Return values
DateTimeImmutablesignature()
Return a canonical key suitable for deduplication and merges.
public
signature() : string
Return values
stringstartDateTime()
Return the concrete start datetime for the week that begins at the given Monday midnight.
public
startDateTime(DateTimeImmutable $weekStart) : DateTimeImmutable
Parameters
- $weekStart : DateTimeImmutable