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.
15 lines
366 B
15 lines
366 B
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');
|
|
};
|
|
}); |