Calculating the difference between two dates in JavaScript
Example: Notice how the year for "Christmas" is dynamically set to the current year (or nextyear if Christmas has already passed for this year), so the script is reusable now and in the future as well without having to modify it. Calculating time expired ...