myDate.toDateString() in ECMAScript 262
Return a string version of the date-only portion of the object.
- Return Type
- String
Description
The actual format of the string is specific to the ECMAScript intermpretter (and possibly the locale). The following output is an example from Mozilla's SpiderMonkey interpretter:
var myDate = new Date(2003,11,18,16,15,27,813);
var theDate = myDate.toDateString();
var theTime = myDate.toTimeString();
// ** theDate is "Thu Dec 18 2003"
// ** theTime is "16:15:27 GMT-0700 (MST)"