dateObject.getDay(); JavaScript Copy Javascript Date getDay() 方法返回值 dateObject 所指的星期中的某一天,使用本地时间。返回值是 0(周日) 到 6(周六) 之间的一个整数。 Javascript Date getDay() 方法说明 该方法总是结合一个 Date 对象来使用。 Javascript Date getDay() 方法示例 varDATE=newDate()...
JavaScript Date getDay Method - Learn how to use the JavaScript Date getDay method to retrieve the day of the week as a number (0-6) from a date object.
(Type a title for your page here) function show_now(){ var my_day=new Date() //var dt = new Date(\"Aug 16, 2005 05:55:00\"); var day_name=new Array(7); day_name[0]='Sunday' day_name[1]=' Monday' day_name[2]='Tuesday' day_name[3]='Wednesday' day_name[4]...
The getDay() method returns the day of the week for the specified date according to local time, where 0 represents Sunday.
Definition and Usage The getDay() method returns the day of the week (0 to 6) of a date. Sunday = 0, Monday = 1, ... (See below): Syntax Date.getDay() Parameters Return ValueType Description A number The day of the week (0 to 6). More Examples Get the name of the weekday...
ThegetDay()method returns the day of the week for the specified date according to local time, where 0 represents Sunday.For the day of the month, seeDate.prototype.getDate(). Syntax dateObj.getDay() Return value An integer number, between 0 and 6, corresponding to the day of the week...