Format Date 'yy' causing error

getYear() deprecated. Use the getFullYear() method instead