Jump to content

comparing two dates


alin19

Recommended Posts

Because the time() function includes the current HH:MM:SS on the server and the strtotime() of a just a date will use 00:00:00, other types of comparisons between the two values won't always give correct results nor would any math.

 

If you want all comparisons (<, >, ==, <=, >=, !=) and any math between two dates to work, the time portion must be equivalent.

Link to comment
https://forums.phpfreaks.com/topic/97117-comparing-two-dates/#findComment-497138
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.