Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

saas / miniprogram-reception

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • miniprogram-reception
  • node_modules
  • dayjs
  • esm
  • plugin
  • isoWeeksInYear
  • index.js
  • 李伟康's avatar
    commit · f76fc91c
    李伟康 committed Dec 08, 2025
    f76fc91c Browse Files
index.js 295 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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;
  };
});