Let me explain myself. By knowing the week number and the year of a date:
Date curr = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(curr);
i
Try the Gregorian Calendar algorithm:
public int getFirstDay(int m, int year)
{
int k=1;
int c, y, w, M=0;
if(m>2 && m<=12) M=m-2;
else if(m>0 && M<=2)
{
M=m+10;
year-=1;
}
c=year/100;
y=year%100;
w=(int)((k+(Math.floor(2.6*M - 0.2))-2*c+y+(Math.floor(y/4))+(Math.floor(c/4)))%7);//a fantastic formula
if(w<0) w+=7;
return w;//thus the day of the week is obtained!
}