Jump to content

Compare Two Dates.


adilamarwat
 Share

Recommended Posts

  1. Use mktime() to create a timestamp for the dates you want to compare.
  2. Subtract the smaller timestamp from the greater one.
  3. Usedate() to obtain the values for years, days, and months of the resulting timestamp.
  4. Put these values into a string and display it on the page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...