in date/date_c.php [100:177]
public function diff(
DateTimeInterface $targetObject,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
): DateInterval;
/**
* (PHP 5 >=5.5.0)<br/>
* Returns date formatted according to given format
* @link https://secure.php.net/manual/en/datetime.format.php
* @param string $format <p>
* Format accepted by {@link https://secure.php.net/manual/en/function.date.php date()}.
* </p>
* @return string
* Returns the formatted date string on success or <b>FALSE</b> on failure.
* Since PHP8, it always returns <b>STRING</b>.
*/
#[Pure(true)]
#[TentativeType]
public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string;
/**
* (PHP 5 >=5.5.0)<br/>
* Returns the timezone offset
* @return int|false
* Returns the timezone offset in seconds from UTC on success
* or <b>FALSE</b> on failure. Since PHP8, it always returns <b>INT</b>.
*/
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
#[TentativeType]
public function getOffset(): int;
/**
* (PHP 5 >=5.5.0)<br/>
* Gets the Unix timestamp
* @return int
* Returns the Unix timestamp representing the date.
*/
#[TentativeType]
#[LanguageLevelTypeAware(['8.1' => 'int'], default: 'int|false')]
public function getTimestamp();
/**
* (PHP 5 >=5.5.0)<br/>
* Return time zone relative to given DateTime
* @link https://secure.php.net/manual/en/datetime.gettimezone.php
* @return DateTimeZone|false
* Returns a {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
* or <b>FALSE</b> on failure.
*/
#[TentativeType]
public function getTimezone(): DateTimeZone|false;
/**
* (PHP 5 >=5.5.0)<br/>
* The __wakeup handler
* @link https://secure.php.net/manual/en/datetime.wakeup.php
* @return void Initializes a DateTime object.
*/
#[TentativeType]
public function __wakeup(): void;
#[PhpStormStubsElementAvailable(from: '8.2')]
public function __serialize(): array;
#[PhpStormStubsElementAvailable(from: '8.2')]
public function __unserialize(array $data): void;
/**
* @since 8.4
*/
public function getMicrosecond(): int;
}
/**
* @since 5.5
*/
class DateTimeImmutable implements DateTimeInterface
{