Date function javascript

Added format information for the data.