missing support for strtotime("midnight") and strtotime("noon")
| Request #34676 | missing support for strtotime("midnight") and strtotime("noon") | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2005-09-29 06:20 UTC | Modified: | 2005-10-08 16:31 UTC |
|
||||||||||
| From: | rajiv at alum dot mit dot edu | Assigned: | derick (profile) | |||||||||||
| Status: | Closed | Package: | Feature/Change Request | |||||||||||
| PHP Version: | 5CVS, 4CVS (2005-09-29) | OS: | * | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2005-09-29 06:20 UTC] rajiv at alum dot mit dot edu
Description:
------------
strtotime() should be able to parse "midnight" and "noon".
Reproduce code:
---------------
echo strtotime("midnight");
echo strtotime("noon");
Expected result:
----------------
echo strtotime("midnight");
should print the time stamp for the next midnight
(midnight tomorrow).
echo strtotime("noon");
should print the time stamp for the next noon
(noon today/tomorrow depending on the current time).
echo strtotime("12:00 am");
echo strtotime("12 am");
echo strtotime("12:00 pm");
echo strtotime("12 pm");
all do the correct things.
Actual result:
--------------
echo strtotime("midnight");
returns -1.
echo strtotime("noon");
returns -1.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2005-09-29 09:11 UTC] sniper@php.net
[2005-10-08 15:45 UTC] derick@php.net
[2005-10-08 16:31 UTC] derick@php.net
[2005-10-08 16:31 UTC] derick@php.net