30 seconds of codeBack to Home
Gets the day of the year from a
new Date() and
Date.prototype.getFullYear() to get the first day of the year as a
Date object, subtract it from the provided
date and divide with the milliseconds in each day to get the result.
Math.floor() to appropriately round the resulting day count to an integer.