The DateTimeImmutable class
(PHP 5 >= 5.5.0)
Introduction
This class behaves the same as DateTime except it never modifies itself but returns a new object instead.
Class synopsis
DateTimeImmutable
implements
DateTimeInterface
{
/* Methods */
public static DateTimeImmutable createFromFormat
( string
}$format
, string $time
[, DateTimeZone $timezone
] )Table of Contents
- DateTimeImmutable::add — Adds an amount of days, months, years, hours, minutes and seconds
- DateTimeImmutable::__construct — Returns new DateTimeImmutable object
- DateTimeImmutable::createFromFormat — Returns new DateTimeImmutable object formatted according to the specified format
- DateTimeImmutable::getLastErrors — Returns the warnings and errors
- DateTimeImmutable::modify — Alters the timestamp
- DateTimeImmutable::__set_state — The __set_state handler
- DateTimeImmutable::setDate — Sets the date
- DateTimeImmutable::setISODate — Sets the ISO date
- DateTimeImmutable::setTime — Sets the time
- DateTimeImmutable::setTimestamp — Sets the date and time based on an Unix timestamp
- DateTimeImmutable::setTimezone — Sets the time zone
- DateTimeImmutable::sub — Subtracts an amount of days, months, years, hours, minutes and seconds
There are no user contributed notes for this page.
