JS 字符串转Date
摘要:js 字符串日期 yyyy-MM-dd 转化为 date 遇到一个需要把日期字符串(如:2009-02-03)转换成Javascript中日期对象Date,对Javascript知识的匮乏和四栋让我感觉很迷茫,上网查了一些资料,弄出来了哈。。。 直接进主题: 创建一个日期对象:...
阅读全文
JS 对Date 的操作
摘要:Date.prototype.Format = function(fmt) { //author: meizz var o = { "M+" : this.getMonth() + 1, //月份 "d+" : this.getDate(), //日 "h+" : this.getHours(), //小时 "m+" : this.getMinutes(), //分 "s+" : this.getSeconds(), //秒 "q+" : Math.floor((this.g
阅读全文