mkm
/
yanzhiAPP
Template
2
0
Fork 0
yanzhiAPP/node_modules/dayjs/esm/plugin/weekday/index.js

15 lines
366 B
JavaScript
Raw Permalink Normal View History

2023-10-17 16:02:55 +08:00
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');
};
});