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 366B

123456789101112131415
  1. export default (function (o, c) {
  2. var proto = c.prototype;
  3. proto.weekday = function (input) {
  4. var weekStart = this.$locale().weekStart || 0;
  5. var $W = this.$W;
  6. var weekday = ($W < weekStart ? $W + 7 : $W) - weekStart;
  7. if (this.$utils().u(input)) {
  8. return weekday;
  9. }
  10. return this.subtract(weekday, 'day').add(input, 'day');
  11. };
  12. });