DateTimeImmutable::setTimestamp

(PHP 5 >= 5.5.0, PHP 7) Sets the date and time based on an Unix timestamp public DateTimeImmutable DateTimeImmutable::setTimestamp ( int $unixtimestamp ) Like DateTime::setTimestamp() but works with DateTimeImmutable.

DateTimeImmutable::setTime

(PHP 5 >= 5.5.0, PHP 7) Sets the time public DateTimeImmutable DateTimeImmutable::setTime ( int $hour, int $minute [, int $second = 0 ] ) Like DateTime::setTime() but works with DateTimeImmutable.

DateTimeImmutable::setISODate

(PHP 5 >= 5.5.0, PHP 7) Sets the ISO date public DateTimeImmutable DateTimeImmutable::setISODate ( int $year, int $week [, int $day = 1 ] ) Like DateTime::setISODate() but works with DateTimeImmutable.

DateTimeImmutable::setDate

(PHP 5 >= 5.5.0, PHP 7) Sets the date public DateTimeImmutable DateTimeImmutable::setDate ( int $year, int $month, int $day ) Like DateTime::setDate() but works with DateTimeImmutable.

DateTimeImmutable::__set_state

(PHP 5 >= 5.5.0, PHP 7) The __set_state handler public static DateTimeImmutable DateTimeImmutable::__set_state ( array $array ) Like DateTime::__set_state() but works with DateTimeImmutable.

DateTimeImmutable::modify

(PHP 5 >= 5.5.0, PHP 7) Creates a new object with modified timestamp public DateTimeImmutable DateTimeImmutable::modify ( string $modify ) Creates a new DateTimeImmutable object with modified timestamp. The original object is not modified. Parameters: object Procedural style only: A DateTime object returned by date_create(). The function modifies this object.

DateTimeImmutable::getLastErrors

(PHP 5 >= 5.5.0, PHP 7) Returns the warnings and errors public static array DateTimeImmutable::getLastErrors ( void ) Like DateTime::getLastErrors() but works with DateTimeImmutable.

DateTimeImmutable::createFromMutable

(PHP 5 >= 5.6.0, PHP 7) Returns new DateTimeImmutable object encapsulating the given DateTime object public static DateTimeImmutable DateTimeImmutable::createFromMutable ( DateTime $datetime ) Parameters: datetime The mutable DateTime object that you want to convert to an immutable version. This object is not modified, but instead a new DateTimeImmutable object is create

DateTimeImmutable::createFromFormat

(PHP 5 >= 5.5.0, PHP 7) Returns new DateTimeImmutable object formatted according to the specified format public static DateTimeImmutable DateTimeImmutable::createFromFormat ( string $format, string $time [, DateTimeZone $timezone ] ) Object oriented style Procedural style DateTimeImmutable date_create_immutable_from_format ( string $format , string $time [, DateTimeZone $timezone ] ) Like DateTime::createFromFormat() but

DateTimeImmutable::__construct

(PHP 5 >= 5.5.0, PHP 7) Returns new DateTimeImmutable object DateTimeImmutable date_create_immutable ([ string $time = "now" [, DateTimeZone $timezone = NULL ]] ) Object oriented style public DateTimeImmutable::__construct ([ string $time = "now" [, DateTimeZone $timezone = NULL ]] ) Procedural style Like DateTime::__construct() but works with DateTimeImmutable.