Skip to content
Advertisement

Create a function in codeigniter that returns true if the input datetime is 2days ahead of current datetime, othewise false

I’m new in codeigniter, im trying to create a function that accepts datetime input from a user. If the input is 2 or more days ahead of current datetime, it should return true, if not it should return false.

JavaScript

Advertisement

Answer

You could use DateTime() today +2 day to get the next 2 days :

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement