#[\NoDiscard(message: "as DateTimeImmutable::setMicrosecond() does not modify the object itself")] publicfunctionsetMicrosecond(int$microsecond): static
#[\NoDiscard(message: "as DateTimeImmutable::setTime() does not modify the object itself")] publicfunctionsetTime( int$hour, int$minute, int$second = 0, int$microsecond = 0 ): DateTimeImmutable
#[\Deprecated( since: '8.5', message: 'this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()', )] publicfunction__wakeup(): void
}
Changelog
Version
Description
8.4.0
The class constants are now typed.
7.1.0
The DateTimeImmutable constructor now includes the
current microseconds in the constructed value. Before this, it would
always initialise the microseconds to 0.
Table of Contents
DateTimeImmutable::add — Returns a new object, with added amount of days, months, years, hours, minutes and seconds