From e8af4bab45ffe3ed93269aa2a1420975f182612b Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Thu, 10 Dec 2020 23:12:47 +0000 Subject: [PATCH] Add createFromInterface() for DateTime objects Closes GH-257. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@352009 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../datetime/datetime/createfrominterface.xml | 85 +++++++++++++++++++ .../datetimeimmutable/createfrominterface.xml | 85 +++++++++++++++++++ reference/datetime/versions.xml | 2 + 3 files changed, 172 insertions(+) create mode 100644 reference/datetime/datetime/createfrominterface.xml create mode 100644 reference/datetime/datetimeimmutable/createfrominterface.xml diff --git a/reference/datetime/datetime/createfrominterface.xml b/reference/datetime/datetime/createfrominterface.xml new file mode 100644 index 0000000000..1b39e6446e --- /dev/null +++ b/reference/datetime/datetime/createfrominterface.xml @@ -0,0 +1,85 @@ + + + + + + DateTime::createFromInterface + Returns new DateTime object encapsulating the given DateTimeInterface object + + + + &reftitle.description; + + public static DateTimeDateTime::createFromInterface + DateTimeInterfaceobject + + + + + &reftitle.parameters; + + + + object + + + The DateTimeInterface object that needs + to be converted to a mutable version. This object is not modified, but + instead a new DateTime object is + created containing the same date, time, and timezone information. + + + + + + + + + &reftitle.returnvalues; + + Returns a new DateTime instance. + + + + + &reftitle.examples; + + + Creating a mutable date time object + + +]]> + + + + + + + diff --git a/reference/datetime/datetimeimmutable/createfrominterface.xml b/reference/datetime/datetimeimmutable/createfrominterface.xml new file mode 100644 index 0000000000..c207a5932b --- /dev/null +++ b/reference/datetime/datetimeimmutable/createfrominterface.xml @@ -0,0 +1,85 @@ + + + + + + DateTimeImmutable::createFromInterface + Returns new DateTimeImmutable object encapsulating the given DateTimeInterface object + + + + &reftitle.description; + + public static DateTimeImmutableDateTimeImmutable::createFromInterface + DateTimeInterfaceobject + + + + + &reftitle.parameters; + + + + object + + + The DateTimeInterface object that needs + to be converted to an immutable version. This object is not modified, but + instead a new DateTimeImmutable object is + created containing the same date, time, and timezone information. + + + + + + + + + &reftitle.returnvalues; + + Returns a new DateTimeImmutable instance. + + + + + &reftitle.examples; + + + Creating an immutable date time object + + +]]> + + + + + + + diff --git a/reference/datetime/versions.xml b/reference/datetime/versions.xml index 3cf6481110..21139d4dc4 100644 --- a/reference/datetime/versions.xml +++ b/reference/datetime/versions.xml @@ -12,6 +12,7 @@ + @@ -40,6 +41,7 @@ +