A function that will check the distance between 2 dates.
Posted on 2008-10-08
I have 6 select boxes.
The user select the arrival date using the first 3 select boxes. (Date, Month, Year)
and then he selects the departure time ... another 3 boxes. (Date , Month, Year).
the name of the boxes are :
select name 1 : afiksi_date
select name 2 : afiksi_month
select name 3 : afiksi_year
select name 4 : anaxorisi_date
select name 5 : anaxorisi_month
select name 6 : anaxorisi_year
I want upon the selection of the departure year (select 6) my function to check the days between
arrival and departure :
example : 17/01/2008 -> 19/01/2008 (2 days)
If its easier i would like to check only if the distance is negative or positive.
Thanks in advance.