【学习笔记】js的Date对象相关

格式化:
toString() 转为当地时间的完整格式
toLocaleString() 转为当地时间的简化格式
toLocaleDateString() 当地时间的简化格式,仅保留日期部分
toLocaleTimeString() 当地时间的简化格式,仅保留时间部分
toGMTString() 转为国际标准时间(0时区)

猜你喜欢

转载自blog.csdn.net/ss515896745/article/details/85083171