首页 > CK猪是程序员 > Mootools Bug – Date.getWeek

Mootools Bug – Date.getWeek

mootools-1.2.2.1-more.js

 getWeek: function(){
  var day = (new Date(this.get('year'), 0, 1)).get('date');//应该为get('day');
  return Math.round((this.get('dayofyear') + (day > 3 ? day - 4 : day + 3)) / 7);
 },

mootools-1.2.3.1-more.js

 getWeek: function(){
  return (this.get('dayofyear')  / 7).ceil();
 },

这个完全错

  1. 还没有评论
评论提交中, 请稍候...

留言

可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks