UNPKG

dayjs

Version:

2KB immutable date time library alternative to Moment.js with the same modern API

15 lines (12 loc) 295 B
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; }; });