UNPKG

295 BJavaScriptView Raw
1export default (function (o, c) {
2 var proto = c.prototype;
3
4 proto.isoWeeksInYear = function () {
5 var isLeapYear = this.isLeapYear();
6 var last = this.endOf('y');
7 var day = last.day();
8
9 if (day === 4 || isLeapYear && day === 5) {
10 return 53;
11 }
12
13 return 52;
14 };
15});
\No newline at end of file