|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-12-01 07:29 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2017-12-01 07:29 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 12:00:01 2025 UTC |
Description: ------------ strtotime("first day this month") gives a date for next month. Test script: --------------- <?php $d = "first day this month"; echo "'$d': ".date("Y-m-d", strtotime($d)).PHP_EOL; $d = "first day of this month"; echo "'$d': ".date("Y-m-d", strtotime($d)).PHP_EOL; echo "Today: ".date("Y-m-d").PHP_EOL; Expected result: ---------------- 'first day this month': 2017-11-01 'first day of this month': 2017-11-01 Today: 2017-11-30 Actual result: -------------- 'first day this month': 2017-12-01 'first day of this month': 2017-11-01 Today: 2017-11-30