Quote:
dif is the number of years between the two date objects. The conditional statement will check if the value of dif needs to be change by -1 or not.
It will subtract 1 if today's month is less than the input month.
Or it will subtract 1 if today's month is equal to the input month and today's day of the month is less than the input's day of the month.
|
Exactly. About the Number() liorean had a comrehensive answer above.
Quote:
|
It seems a lot of people are working the date object these days.
|
There must be a Date festival or contest somewere...