Fixed incorrect assigned variable

The var year was assigned to the dateObj.getFullYear() which is always
the real current year, not the displayed year on the calendar.