src/constraint/weekofyear.js
function(d) {
    if (d.wy) return d.wy;

    // move to the Thursday in the target week and find Thurs of target year
    var wThur = later.dw.next(later.wy.start(d), 5),
        YThur = later.dw.next(later.Y.prev(wThur, later.Y.val(wThur)-1), 5);

    // caculate the difference between the two dates in weeks
    return (d.wy = 1 + Math.ceil((wThur.getTime() - YThur.getTime()) / later.WEEK));
  }
function(d) {
    if (d.wy) return d.wy;

    // move to the Thursday in the target week and find Thurs of target year
    var wThur = later.dw.next(later.wy.start(d), 5),
        YThur = later.dw.next(later.Y.prev(wThur, later.Y.val(wThur)-1), 5);

    // caculate the difference between the two dates in weeks
    return (d.wy = 1 + Math.ceil((wThur.getTime() - YThur.getTime()) / later.WEEK));
  }
function ( d ) { if ( d . wy ) return d . wy ; // move to the Thursday in the target week and find Thurs of target year var wThur = later . dw . next ( later . wy . start ( d ) , 5 ) , YThur = later . dw . next ( later . Y . prev ( wThur , later . Y . val ( wThur ) - 1 ) , 5 ) ; // caculate the difference between the two dates in weeks return ( d . wy = 1 + Math . ceil ( ( wThur . getTime ( ) - YThur . getTime ( ) ) / later . WEEK ) ) ; }
The ISO week year value of the specified date.

@param {Date} d: The date to calculate the value of
The ISO week year value of the specified date .