From 26e0c6ef75d4a9a218462a5153c604e37b59f3c7 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 2 Jun 2022 17:03:30 +0100 Subject: [PATCH] Fixed bug #78000: Missing description of reltext's different behaviors (static & method on object) --- reference/datetime/formats.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reference/datetime/formats.xml b/reference/datetime/formats.xml index fa77811b26..d3aa74bfb5 100644 --- a/reference/datetime/formats.xml +++ b/reference/datetime/formats.xml @@ -919,6 +919,14 @@ class DateTime#1 (3) { produces "2008-07-24 00:00". The reason for this is that those five statements directly influence the current time. + + Keywords such as "first day of" depend on the context in which the + relative format string is used. If used with a static method or function, + the referent is the current system timestamp. However, if used in + DateTime::modify or + DateTimeImmutable::modify, the referent is the object + on which the modify() method is called. +