Open GoogleCodeExporter opened 8 years ago
I think there might be a problem in the Alpha-1 release, but the issue has been
fixed
in svn (http://www.datejs.com/svn/).
Original comment by geoff%co...@gtempaccount.com
on 6 Jun 2009 at 10:29
i am using the svn version. @date: 2008-04-13
Original comment by i...@molinodacapo.de
on 7 Jun 2009 at 9:32
Original comment by geoff%co...@gtempaccount.com
on 7 Jun 2009 at 6:58
$P.getWeek=function(){
var a,b,c,d,e,f,g,n,s,w;
$y=(!$y)?this.getFullYear():$y;
$m=(!$m)?this.getMonth()+1:$m;
$d=(!$d)?this.getDate():$d;
if($m<=2){
a=$y-1;
b=(a/4|0)-(a/100|0)+(a/400|0);
c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0);
s=b-c;
e=0;
f=$d-1+(31*($m-1));
//Fix bug week???
}else if($m==3){
a=$y;
b=(a/4|0)-(a/100|0)+(a/400|0);
c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0);
s=b-c;
e=s+1;
f=$d+((153*($m-3)+1)/5)+58+s;
//end
}else{
a=$y;
b=(a/4|0)-(a/100|0)+(a/400|0);
c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0);
s=b-c;
e=s+1;
f=$d+((153*($m-3)+2)/5)+58+s;
}
g=(a+b)%7;
d=(f+g-e)%7;
n=(f+3-d)|0;
if(n<0){
w=53-((g-s)/5|0);
}else if(n>364+s){
w=1;
}else{
w=(n/7|0)+1;
}
$y=$m=$d=null;
return w;
};
Original comment by velozyra...@gmail.com
on 4 Sep 2009 at 9:32
works in the current build on my fork: https://github.com/abritinthebay/datejs/
Original comment by darkcr...@gmail.com
on 16 Sep 2013 at 1:31
Original issue reported on code.google.com by
i...@molinodacapo.de
on 5 Jun 2009 at 3:55