Abstracting date and js-beautify