index.js 287 B

123456789101112131415
  1. export default (function (o, c) {
  2. var proto = c.prototype;
  3. proto.weekYear = function () {
  4. var month = this.month();
  5. var weekOfYear = this.week();
  6. var year = this.year();
  7. if (weekOfYear === 1 && month === 11) {
  8. return year + 1;
  9. }
  10. return year;
  11. };
  12. });