摘要: 1,获取当前日期 2, 将日期转成string 3, string替换字符 4, 切片 5,将object对象转成Date 6, 将Date对象月份进行增减 7,获取当天的年月日 8,获取当天是星期几? 阅读全文
posted @ 2019-04-02 12:43 aaronthon 阅读(346) 评论(0) 推荐(0) 编辑
摘要: var myDate = new Date();myDate.getYear(); //获取当前年份(2位)myDate.getFullYear(); //获取完整的年份(4位,1970-????)myDate.getMonth(); //获取当前月份(0-11,0代表1月)myDate.getDa 阅读全文
posted @ 2019-04-02 09:52 aaronthon 阅读(119152) 评论(0) 推荐(2) 编辑