Last active
June 1, 2019 13:02
-
-
Save linkimfly/16d102965d50ace7dd3476d2c9d1f840 to your computer and use it in GitHub Desktop.
The effect you want
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc: | |
In addition, if the current time is less than 30 minutes from endhour, expired is also counted as expired. | |
Array | |
( | |
[0] => Array | |
( | |
[date] => 2019-06-01 | |
[week] => Saturday | |
[subdate] => 06-01 | |
[timelist] => Array | |
( | |
[0] => Array | |
( | |
[period] => 08 ~ 10 | |
[starthour] => 08 | |
[endhour] => 10 | |
[expired] => true //My current time is 20:07, so the output true means it has expired. | |
) | |
[1] => Array | |
( | |
[period] => 10 ~ 12 | |
[starthour] => 10 | |
[endhour] => 12 | |
[expired] => true //My current time is 20:07, so the output true means it has expired. | |
) | |
[2] => Array | |
( | |
[period] => 12 ~ 14 | |
[starthour] => 12 | |
[endhour] => 14 | |
[expired] => true //My current time is 20:07, so the output true means it has expired. | |
) | |
[3] => Array | |
( | |
[period] => 14 ~ 16 | |
[starthour] => 14 | |
[endhour] => 16 | |
[expired] => true //My current time is 20:07, so the output true means it has expired. | |
) | |
[4] => Array | |
( | |
[period] => 16 ~ 18 | |
[starthour] => 16 | |
[endhour] => 18 | |
[expired] => true ////My current time is 20:07, so the output true means it has expired. | |
) | |
[5] => Array | |
( | |
[period] => 18 ~ 20 | |
[starthour] => 18 | |
[endhour] => 20 | |
[expired] => true //My current time is 20:07, so the output true means it has expired. | |
) | |
[6] => Array | |
( | |
[period] => 20 ~ 22 | |
[starthour] => 20 | |
[endhour] => 22 | |
[expired] => false //Here is false because my current time has not expired, my current time is 20:07 at night. | |
) | |
) | |
) | |
[1] => Array | |
( | |
[date] => 2019-06-02 | |
[week] => Sunday | |
[subdate] => 06-02 | |
[timelist] => Array | |
( | |
[0] => Array | |
( | |
[period] => 08 ~ 10 | |
[starthour] => 08 | |
[endhour] => 10 | |
[expired] => false //Because it is June 2, so compared with the current time has not passed. | |
) | |
[1] => Array | |
( | |
[period] => 10 ~ 12 | |
[starthour] => 10 | |
[endhour] => 12 | |
[expired] => false //Because it is June 2, so compared with the current time has not passed. | |
) | |
[2] => Array | |
( | |
[period] => 12 ~ 14 | |
[starthour] => 12 | |
[endhour] => 14 | |
[expired] => false //Because it is June 2, so compared with the current time has not passed. | |
) | |
[3] => Array | |
( | |
[period] => 14 ~ 16 | |
[starthour] => 14 | |
[endhour] => 16 | |
[expired] => false //Because it is June 2, so compared with the current time has not passed. | |
) | |
[4] => Array | |
( | |
[period] => 16 ~ 18 | |
[starthour] => 16 | |
[endhour] => 18 | |
[expired] => false //Because it is June 2, so compared with the current time has not passed. | |
) | |
[5] => Array | |
( | |
[period] => 18 ~ 20 | |
[starthour] => 18 | |
[endhour] => 20 | |
[expired] => false //Because it is June 2, so compared with the current time has not passed. | |
) | |
[6] => Array | |
( | |
[period] => 20 ~ 22 | |
[starthour] => 20 | |
[endhour] => 22 | |
[expired] => false //Because it is June 2, so compared with the current time has not passed. | |
) | |
) | |
) | |
) |
check now i have update the gist https://gist.github.com/ManojKiranA/993383025928c285c30db6418e10708b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what is you timezone