code: function(d) {
      return d.wmEnd || (d.wmEnd = later.date.prev(
        later.Y.val(d),
        later.M.val(d),
        Math.min(later.D.val(d) + (7 - later.dw.val(d)), later.D.extent(d)[1])));
    }
docs: The end of the week of the specified date.
  
  @param {Date} d: The specified date