Improved date format to work in older versions of JS