// Get the current date today = new Date(); // Create a Date object for Christmas of the current year var wed = new Date(today.getFullYear(), 9, 14); // Check if the current date is after December 25th if (today.getMonth() == 9 && today.getDate() > 14) { // If true, set Christmas for the next year wed.setFullYear(wed.getFullYear() + 1); } // Calculate the difference in days between today and Christmas var one_day = 1000 * 60 * 60 * 24; // Log the number of days left until Christmas to the console "IN " + console.log(Math.ceil((cmas.getTime() - today.getTime()) / (one_day)) + " DAYS!");