Hey,
I want to be able to check the expiry of a date. I.e. in plain english;
'if today's date is more than a date specified...do this'
Should be simple right? So far I have this:
// This is a date +3 months into the future
$date = date("jS M Y", mktime(0, 0, 0, $month + 3, $day, $year));
// My conditional
if (date("jS M Y", time()) > $date) {
// Do something
// ...
This seems to work fine, but for some reason I am told by some of my users that after a random amount of time, this doesn't seem valid and they are shown an expired response sooner than they should be with this conditional.
I was wondering if this was the correct way to check a date? Am I ok using '>' or is there another way to form a conditional here?
Thanks.