- getDate()
getDate() 方法可返回月份的某一天。
- getDay()
getDay() 方法可返回一周(0~6)的某一天的数字。
- getFullYear()
getFullYear() 方法可返回一个表示年份的 4 位数字。
- getHours()
getHours() 方法可返回时间的小时字段。
- getMilliseconds()
getMilliseconds() 方法可返回时间的毫秒。(0-999)
- getMinutes()
getMinutes() 方法可返回时间的分钟字段。 (0-59)
- getMonth()
getMonth() 方法可返回表示月份的数字。返回值是 0(一月) 到 11(十二月) 之间的一个整数。
- getSeconds()
getSeconds() 方法可返回时间的秒。返回值是 0 ~ 59 之间的一个整数。
- getTime()
getTime() 方法可返回距 1970 年 1 月 1 日之间的毫秒数。
- getTimezoneOffset()
getTimezoneOffset() 方法可返回格林威治时间和本地时间之间的时差,以分钟为单位。
- getUTCDate()
getUTCDate() 方法可根据世界时返回一个月 (UTC) 中的某一天。 (1-31)
- getUTCDay()
getUTCDay() 方法根据世界时返回表示星期的一天的一个数字。(0-6)
- getUTCFullYear()
getUTCFullYear() 方法返回根据世界时 (UTC) 表示的四位数字年份。
- getUTCHours()
getUTCHours() 方法可根据世界时 (UTC) 返回时间的小时。(0-23)
- getUTCMilliseconds()
getUTCMilliseconds() 方法可根据世界时 (UTC) 返回时间的毫秒(0~999)。
- getUTCMinutes()
getUTCMinutes() 方法可根据世界时 (UTC) 返回时间的分钟字段(0~59)。
- getUTCMonth()
getUTCMonth() 方法可返回一个表示月份的数字(按照世界时 UTC) (0-11)
- getUTCSeconds()
getUTCSeconds() 方法可根据世界时返回时间的秒数(0~59)。
- parse()
parse() 方法可解析一个日期时间字符串,并返回 1970/1/1 午夜距离该日期时间的毫秒数。
- setDate()
setDate() 方法用于设置一个月的某一天。
- setFullYear()
setFullYear() 方法用于设置年份。
- setHours()
setHours() 方法用于设置指定的时间的小时字段。
- setMilliseconds()
setMilliseconds() 方法用于设置指定时间的毫秒字段。
- setMinutes()
setMinutes() 方法用于设置指定时间的分钟字段。
- setMonth()
setMonth() 方法用于设置月份。
- setSeconds()
The setSeconds() 方法用于设置日期对象的秒字段。
- setTime()
setTime() 方法以毫秒设置 Date 对象。
- setUTCDate()
setUTCDate() 方法用于根据世界时 (UTC) 设置一个月中的某一天。
- setUTCFullYear()
setUTCFullYear() 方法用于根据世界时 (UTC) 设置年份。
- setUTCHours()
setUTCHours() 方法用于根据世界时 (UTC) 设置小时(0 - 23)。
- setUTCMilliseconds()
setUTCMilliseconds() 方法用于根据世界时 (UTC) 设置指定时间的毫秒。
- setUTCMinutes()
setUTCMinutes() 方法用于根据世界时 (UTC) 来设置指定时间的分钟。
- setUTCMonth()
setUTCMonth() 方法用于根据世界时 (UTC) 来设置月份。
- setUTCSeconds()
setUTCSeconds() 方法用于根据世界时 (UTC) 设置指定时间的秒字段。
- toDateString()
toDateString() 方法可把 Date 对象的日期部分转换为字符串,并返回结果。
- toISOString()
toISOString() 方法可以使用ISO标准将 Date 对象转换为字符串。
- toJSON()
toJSON() 方法可以将 Date 对象转换为字符串,并格式化为 JSON 数据格式。
- toLocaleDateString()
toLocaleDateString() 方法可根据本地时间把 Date 对象的日期部分转换为字符串,并返回结果。
- toLocaleString()
toLocaleString() 方法可根据本地时间把 Date 对象转换为字符串,并返回结果。
- toLocaleTimeString()
toLocaleTimeString() 方法可根据本地时间把 Date 对象的时间部分转换为字符串,并返回结果。
- toTimeString()
toTimeString() 方法可把 Date 对象的时间部分转换为字符串,并返回结果。
- toUTCString()
toUTCString() 方法可根据世界时 (UTC) 把 Date 对象转换为字符串,并返回结果。
- UTC()
UTC() 方法可根据世界时返回 1970 年 1 月 1 日 到指定日期的毫秒数
Date
最新推荐文章于 2022-08-21 10:16:24 发布