Req #78459 [Wfx]: Please Provide The Feture Of AM/PM Comparission.
| From: | requinix@php.net | Date: | Mon, 26 Aug 2019 16:27:08 +0000 |
| Subject: | Req #78459 [Wfx]: Please Provide The Feture Of AM/PM Comparission. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222424@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78459&edit=1
ID: 78459
Updated by: requinix@php.net
Reported by: tpatel6964 dot sd at gmail dot com
Summary: Please Provide The Feture Of AM/PM Comparission.
Status: Wont fix
Type: Feature/Change Request
Package: Date/time related
Operating System: Windows 10 64-Bit
PHP Version: 7.4Git-2019-08-26 (Git)
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.
Previous Comments:
------------------------------------------------------------------------
[2019-08-26 16:23:23] tpatel6964 dot sd at gmail dot com
But This Is Not Working I Will Also Tried That Logic.
There Is Another Way TO Implement It???
------------------------------------------------------------------------
[2019-08-26 16:14:37] requinix@php.net
Use zero-padded 24-hour times without an "am/pm". That's the "H:i" format.
------------------------------------------------------------------------
[2019-08-26 16:12:39] tpatel6964 dot sd at gmail dot com
Description:
------------
---
From manual page: https://php.net/refs.calendar
---
Please Make A Feture Of Comparing Time in AM/PM Like example Is Given Below:
Test script:
---------------
$date = date_default_timezone_set('Asia/Kolkata');
$Darshanfrom="5:00 AM";
$Darshanto="9:00 PM";
$today=date("g:i A");
if($today>=$Darshanfrom && $today<=$Darshanto)
{
echo"The Meassgae Is Here";
header("Location: https://www.sai.org.in/en/sai-video-popup");
}
else
{
echo"The Message Is Here!";
}
Expected result:
----------------
if the condition is true then it will be redirected to header location else it will be print the
echo massge
Actual result:
--------------
it Will Always Print The Else Part
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78459&edit=1