ES6 - toDateString() Method


Advertisements


JavaScript date toDateString() method returns the date portion of a Date object in human readable form.

Syntax

Date.toDateString()       

Return Value

Returns the date portion of a Date object in human readable form.

Example

var dt = new Date(1993, 6, 28, 14, 39, 7); 
console.log( "Formated Date : " + dt.toDateString() )        

Output

Formated Date : Wed Jul 28 1993          

es6_date.htm

Advertisements
E-Books Store