Newer
Older
alert / js / node_modules / dayjs / esm / plugin / isoWeeksInYear / index.js
@Réz István Réz István on 18 Nov 2021 295 bytes first commit
export default (function (o, c) {
  var proto = c.prototype;

  proto.isoWeeksInYear = function () {
    var isLeapYear = this.isLeapYear();
    var last = this.endOf('y');
    var day = last.day();

    if (day === 4 || isLeapYear && day === 5) {
      return 53;
    }

    return 52;
  };
});