Update formatDate.js

fixed jshint errors