Search Results
DateTimeImmutable::add () - Returns a new object, with added amount of days, months, years, hours, minutes and seconds DateTimeImmutable::diff () - Returns the difference between two DateTime objects
May 14, 2021 · The two classes DateTime and DateTimeImmutable implement the same interface DateTimeInterface. Therefore I want to know : What is the difference between these two DateTime and DateTimeImmutable cla...
The DateTimeImmutable class provides an object-oriented interface for working with immutable dates and times in PHP.
Oct 11, 2019 · The DateTimeImmutable::sub () function is an inbuilt function in PHP which is used to subtract a number of days, months, years, hours, minutes and seconds from a created DateTimeImmutable object.
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
DateTimeImmutable::sub — Subtracts an amount of days, months, years, hours, minutes and seconds
People also ask
What does datetimeimmutable do?
What is a datetimeimmutable class?
What is the difference between datetime and datetimeimmutable?
Why does datetimeimmutable not return the same instance?
DateTime::sub — Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object DateTimeImmutable — The DateTimeImmutable class DateTimeImmutable::add — Adds an amount of days, months, years, hours, minutes and seconds DateTimeImmutable::__construct — Returns new DateTimeImmutable object
