fixed bug where year appeared as 'undefined'