Date object's properties and methods

博客介绍了Date对象的属性和方法。提到属性的语法为object.property_name,方法的语法为object.method_name(),还给出了Netscape(NN)和Internet Explorer(IE)相关说明。

The Date object's properties and methods are described below:

NN: Netscape, IE: Internet Explorer

Properties

Syntax: object.property_name

PropertyDescriptionNNIE 
constructorContains the function that created an object's prototype44
prototypeAllows addition of properties to a date34

Methods

Syntax: object.method_name()

MethodDescriptionNNIE
Date()Returns a Date object23
getDate()Returns the date of a Date object (from 1-31)23
getDay()Returns the day of a Date object (from 0-6. 0=Sunday, 1=Monday, etc.)23
getMonth()Returns the month of a Date object (from 0-11. 0=January, 1=February, etc.)23
getFullYear()Returns the year of a Date object (four digits)44
getYear()Returns the year of a Date object (from 0-99). Use getFullYear instead !!23
getHours()Returns the hour of a Date object (from 0-23)23
getMinutes()Returns the minute of a Date object (from 0-59)23
getSeconds()Returns the second of a Date object (from 0-59)23
getMilliseconds()Returns the millisecond of a Date object (from 0-999)44
getTime()Returns the number of milliseconds since midnight 1/1-197023
getTimezoneOffset()Returns the time difference between the user's computer and GMT23
getUTCDate()Returns the date of a Date object in universal (UTC) time44
getUTCDay()Returns the day of a Date object in universal time44
getUTCMonth()Returns the month of a Date object in universal time44
getUTCFullYear()Returns the four-digit year of a Date object in universal time44
getUTCHours()Returns the hour of a Date object in universal time44
getUTCMinutes()Returns the minutes of a Date object in universal time44
getUTCSeconds()Returns the seconds of a Date object in universal time44
getUTCMilliseconds()Returns the milliseconds of a Date object in universal time44
parse()Returns a string date value that holds the number of milliseconds since January 01 1970 00:00:0023
setDate()Sets the date of the month in the Date object (from 1-31)23
setFullYear()Sets the year in the Date object (four digits)44
setHours()Sets the hour in the Date object (from 0-23)23
setMilliseconds()Sets the millisecond in the Date object (from 0-999)44
setMinutes()Set the minute in the Date object (from 0-59)23
setMonth()Sets the month in the Date object (from 0-11. 0=January, 1=February)23
setSeconds()Sets the second in the Date object (from 0-59)23
setTime()Sets the milliseconds after 1/1-197023
setYear()Sets the year in the Date object (00-99)23
setUTCDate()Sets the date in the Date object, in universal time (from 1-31)44
setUTCDay()Sets the day in the Date object, in universal time (from 0-6. Sunday=0, Monday=1, etc.)44
setUTCMonth()Sets the month in the Date object, in universal time (from 0-11. 0=January, 1=February)44
setUTCFullYear()Sets the year in the Date object, in universal time (four digits)44
setUTCHours()Sets the hour in the Date object, in universal time (from 0-23)44
setUTCMinutes()Sets the minutes in the Date object, in universal time (from 0-59)44
setUTCSeconds()Sets the seconds in the Date object, in universal time (from 0-59)44
setUTCMilliseconds()Sets the milliseconds in the Date object, in universal time (from 0-999)44
toGMTString()Converts the Date object to a string, set to GMT time zone23
toLocaleString()Converts the Date object to a string, set to the current time zone23
toString()Converts the Date object to a string24
基于部落竞争与成员合作算法(CTCM)融合动态窗口法DWA的无人机三维动态避障方法研究,MATLAB代码 动态避障路径规划:基于部落竞争与成员合作算法(CTCM)融合动态窗口法DWA的无人机三维动态避障方法研究,MATLAB 融合DWA的青蒿素优化算法(AOA)求解无人机三维动态避障路径规划,MATLAB代码 基于动态环境下多智能体自主避障路径优化的DWA算法研究,MATLAB代码 融合DWA的青蒿素优化算法AOA求解无人机三维动态避障路径规划,MATLAB代码 基于DWA的多智能体动态避障路径规划算法研究,MATLAB代码 融合动态窗口法DWA的粒子群算法PSO求解无人机三维动态避障路径规划研究,MATLAB代码 基于粒子群算法PSO融合动态窗口法DWA的无人机三维动态避障路径规划研究,MATLAB代码 基于ACOSRAR-DWA无人机三维动态避障路径规划,MATLAB代码 基于ACOSRAR-DWA无人机三维动态避障路径规划,MATLAB代码 基于DWA的动态环境下无人机自主避障路径优化,MATLAB代码 基于DWA的动态环境下机器人自主避障路径规划,MATLAB代码 基于城市场景下RRT、ACO、A*算法的无人机三维路径规划方法研究,MATLAB代码 基于城市场景下无人机三维路径规划的导航变量的多目标粒子群优化算法(NMOPSO),MATLAB代码 导航变量的多目标粒子群优化算法(NMOPSO)求解复杂城市场景下无人机三维路径规划,MATLAB代码 原创:5种最新多目标优化算法求解多无人机协同路径规划(多起点多终点,起始点、无人机数、障碍物可自定义),MATLAB代码 原创:4种最新多目标优化算法求解多无人机协同路径规划(多起点多终点,起始点、无人机数、障碍物可自定义),MATLAB代码 高维超多目标优化:基于导航变量的多目标粒子群优化算法(NMOPSO)的无人机三维
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值