Newer
Older
alert / js / node_modules / dayjs / esm / plugin / weekday / index.js
@Réz István Réz István on 18 Nov 2021 366 bytes first commit
export default (function (o, c) {
  var proto = c.prototype;

  proto.weekday = function (input) {
    var weekStart = this.$locale().weekStart || 0;
    var $W = this.$W;
    var weekday = ($W < weekStart ? $W + 7 : $W) - weekStart;

    if (this.$utils().u(input)) {
      return weekday;
    }

    return this.subtract(weekday, 'day').add(input, 'day');
  };
});