您的位置:首页 > 其它

some function about Date

2016-08-18 23:36 288 查看
1:getTime()

Grammar:dateObject.getTime()

This function returns the number of milliseconds from 1970.1.1 00:00:00.000 to today.



2:getFullYear()

Grammar:dateObject.getFullYear()

This function returns the year which is combined with four digits.



3:getMonth()

Grammar:dateObject.getMonth()

This function returns month,especially the return value is taken between 0 and 11.So you need add one to the month you get by using this function to get the correct month.



4:getDate()

Grammar:dateObject.getDate()

This function returns one day in a month.



5:getDay()

Grammar:dateObject.getDay()

This function returns one day in a week.



Attention:Sometimes we may misuse function getDay() instead of getDate()!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: