Friday, 10 August 2018

Work Out The Number Of Days Before A Date

Use the following function to work out the number of days between today and a date in the future. The function takes three parameters of the day, month and year of the date in question.
 
To use this function just give it a date, here are some examples.
  1. echo dateDifference(13,07,2008); // 42
  2. echo dateDifference(01,01,2010); // the next "binary date" = 579
  3. echo dateDifference(25,12,2010); // 937

0 comments:

Post a Comment