• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.