Skip to content
  • This project
    • Loading...
  • Sign in

杨炀 / ztx_wx_admin

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • ztx_wx_admin
  • node_modules
  • dayjs
  • esm
  • plugin
  • isoWeeksInYear
  • index.js
  • 杨炀's avatar
    init · a7520530
    杨炀 committed 2023-10-08 10:09:56 +0800
    a7520530
index.js 295 Bytes
Raw Blame History Permalink
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;
  };
});