Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 295B

123456789101112131415
  1. export default (function (o, c) {
  2. var proto = c.prototype;
  3. proto.isoWeeksInYear = function () {
  4. var isLeapYear = this.isLeapYear();
  5. var last = this.endOf('y');
  6. var day = last.day();
  7. if (day === 4 || isLeapYear && day === 5) {
  8. return 53;
  9. }
  10. return 52;
  11. };
  12. });