Welcome Guest, Not a member yet? Register   Sign In
Trying to create condition with dates.
#1

So I'm trying to figure out:
how do I create a condition for a partial to show until a certain date arrives? i.e. if date < 12-21-2020 

Can someone help me with figuring out this condition? Let me know what other information I should provide. 

Thanks,
Reply
#2

Something like below, not tested.

PHP Code:
$today date("m-d-Y");
$date  '10-10-2020';

if (
$today $date)
{
    // true
}
else
{
    // false


SEE:

php.net - date
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB