implements |
DateTimeInterface |
---|
Methods | ||
---|---|---|
public
|
__construct(string $datetime = "now", ?DateTimeZone $timezone = null)
|
# |
public
|
__serialize(): array
|
# |
public
|
__unserialize(array $data): void
|
# |
public
|
__wakeup(): void
|
# |
public
static
|
__set_state(array $array): DateTime
|
# |
public
static
|
createFromImmutable(DateTimeImmutable $object): DateTime
|
# |
public
static
|
createFromInterface(DateTimeInterface $object): DateTime
|
# |
public
static
|
createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false
|
# |
public
static
|
getLastErrors(): array|false
|
# |
public
|
format(string $format): string
|
# |
public
|
modify(string $modifier): DateTime|false
|
# |
public
|
add(DateInterval $interval): DateTime
|
# |
public
|
sub(DateInterval $interval): DateTime
|
# |
public
|
getTimezone(): DateTimeZone|false
|
# |
public
|
setTimezone(DateTimeZone $timezone): DateTime
|
# |
public
|
getOffset(): int
|
# |
public
|
setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0): DateTime
|
# |
public
|
setDate(int $year, int $month, int $day): DateTime
|
# |
public
|
setISODate(int $year, int $week, int $dayOfWeek = 1): DateTime
|
# |
public
|
setTimestamp(int $timestamp): DateTime
|
# |
public
|
getTimestamp(): int
|
# |
public
|
diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval
|
# |