get full year in nodejs code example Example: how to get current year in nodejs const todaysDate = new Date() const currentYear = todaysDate.getFullYear() // 2020