Bug #69176 [Opn->Nab]: strtotime if wrong with first/last day of week

From: Date: Tue, 03 Mar 2015 19:59:02 +0000
Subject: Bug #69176 [Opn->Nab]: strtotime if wrong with first/last day of week
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191105@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69176&edit=1

 ID:                 69176
 Updated by:         ab@php.net
 Reported by:        cpuidle at gmx dot de
 Summary:            strtotime if wrong with first/last day of week
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Strings related
 Operating System:   Windows
 PHP Version:        5.6.6
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

"first day of" is only documented to only work with months.

Thanks.


Previous Comments:
------------------------------------------------------------------------
[2015-03-03 19:05:22] cpuidle at gmx dot de

Description:
------------
Both give the same results- Sunday 00:00

strtotime("first day of last week 00:00")
strtotime("first day of this week 00:00")

While Monday is a perfect workaround for "first day" it should work according to http://php.net/manual/de/datetime.formats.relative.php

Also, when exchanging week with month, it works like a charm.




------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69176&edit=1


Thread (7 messages)

« previous php.bugs (#191105) next »