Changing to date to Local date String. toTimeString. Getting the time string part from the date object. toUTCString. JS Date Object is used to set the date, time, hour, minute and seconds.var a new Date() is used to specify a variable date . document.write(constructor is : a.constructor) is used to provide reference to date string function. Before getting into further details, here are some examples of how this script can be used: var now new Date()Uppercase, single-character time marker string: A or P. Uppercase T unlike CFs t to allow for user-specified casing. Date.prototype.toLocaleDateString().