this is th javscript code i have used to get calculate the week no. from the given date....but the output i am getting is incorrect
   var dayNr   = (this.getDay() + 6) % 7;  
    target.setDate(target.getDate() - dayNr + 3);  
    var firstThursday = target.valueOf();  
    target.setMonth(0, 1);  
    if (target.getDay() != 4) {  
    target.setMonth(0, 1 + ((4 - target.getDay()) + 7) % 7);  
    }  
    return 1 + Math.ceil((firstThursday - target) / 604800000); 
i want to calculate the week no. from the given date.....any other solution is also welcome...need it urgently