| Methods |
public
static
|
date(int $year, int $month, int $day): self
|
#
|
public
static
|
floating(DateTimeInterface $wallClock, ?string $unresolvedTzid = null): self
A floating time with the wall-clock time of the given date.
A floating time with the wall-clock time of the given date.
|
#
|
public
static
|
fromDateTime(DateTimeInterface $dateTime, ?string $tzid = null): self
A UTC time for a UTC date, a zoned time otherwise.
A UTC time for a UTC date, a zoned time otherwise.
|
#
|
public
static
|
parse(string $value, bool $date = false, ?string $tzid = null, ?DateTimeZone $timezone = null): self
Parse "20261010", "20261010T100000" or "20261010T100000Z".
Parse "20261010", "20261010T100000" or "20261010T100000Z".
Parameters
| $timezone |
resolved TZID; null keeps a TZID value floating
|
Throws
|
#
|
public
static
|
isValid(string $value, bool $date = false): bool
Whether parse() accepts the value, without creating objects.
Whether parse() accepts the value, without creating objects.
|
#
|
public
|
isDate(): bool
|
#
|
public
|
isFloating(): bool
|
#
|
public
|
isUtc(): bool
|
#
|
public
|
isZoned(): bool
|
#
|
public
|
timezone(): ?DateTimeZone
Timezone of a UTC or zoned value.
Timezone of a UTC or zoned value.
|
#
|
public
|
format(string $format): string
Format the local value (see DateTimeInterface::format()) without any conversion.
Format the local value (see DateTimeInterface::format()) without any conversion.
|
#
|
public
|
toDateTime(?DateTimeZone $timezone = null, ?DateTimeZone $default = null): DateTimeImmutable
The instant of the value. UTC and zoned values keep their timezone unless one is given. Dates (midnight) and floating
times need a timezone: the given one, or the $default one (e.g. X-WR-TIMEZONE).
The instant of the value. UTC and zoned values keep their timezone unless one is given. Dates (midnight) and floating
times need a timezone: the given one, or the $default one (e.g. X-WR-TIMEZONE).
Throws
|
#
|
public
|
add(DateInterval $interval): self
Add a duration: days keep the local time (also across DST), hours are elapsed time
for UTC and zoned values (RFC 5545, section 3.3.6).
Add a duration: days keep the local time (also across DST), hours are elapsed time
for UTC and zoned values (RFC 5545, section 3.3.6).
|
#
|
public
|
equals(self $other): bool
|
#
|
public
|
__toString(): string
The iCalendar value, e.g. "20261010T100000Z" (the TZID parameter is not included).
The iCalendar value, e.g. "20261010T100000Z" (the TZID parameter is not included).
Implements
|
#
|