údržba
This commit is contained in:
10
CyLukTs/lukan/node_modules/dayjs/esm/plugin/weekYear/index.d.ts
generated
vendored
Normal file
10
CyLukTs/lukan/node_modules/dayjs/esm/plugin/weekYear/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { PluginFunc } from 'dayjs/esm'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
|
||||
declare module 'dayjs/esm' {
|
||||
interface Dayjs {
|
||||
weekYear(): number
|
||||
}
|
||||
}
|
19
CyLukTs/lukan/node_modules/dayjs/esm/plugin/weekYear/index.js
generated
vendored
Normal file
19
CyLukTs/lukan/node_modules/dayjs/esm/plugin/weekYear/index.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
export default (function (o, c) {
|
||||
var proto = c.prototype;
|
||||
|
||||
proto.weekYear = function () {
|
||||
var month = this.month();
|
||||
var weekOfYear = this.week();
|
||||
var year = this.year();
|
||||
|
||||
if (weekOfYear === 1 && month === 11) {
|
||||
return year + 1;
|
||||
}
|
||||
|
||||
if (month === 0 && weekOfYear >= 52) {
|
||||
return year - 1;
|
||||
}
|
||||
|
||||
return year;
|
||||
};
|
||||
});
|
Reference in New Issue
Block a user