Die DateTimeImmutable Klasse
(PHP 5 >= 5.5.0)
Einführung
Diese Klasse verhält sich wie die Klasse DateTime, außer dass sie nie verändert, sondern statt dessen ein neues Objekt zurückgegeben wird.
Klassenbeschreibung
DateTimeImmutable
implements
DateTimeInterface
{
/* Methoden */
public static DateTimeImmutable createFromFormat
( string
}$format
, string $time
[, DateTimeZone $timezone
] )Inhaltsverzeichnis
- 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::createFromMutable — Returns new DateTimeImmutable object encapsulating the given DateTime object
- DateTimeImmutable::getLastErrors — Returns the warnings and errors
- DateTimeImmutable::modify — Creates a new object with modified 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