1 | /**
|
2 | * 返回前几年或后几年的日期
|
3 | * @param date 字符串/日期/时间戳
|
4 | * @param year 年(默认当前年)、前几个年(数值)、后几个年(数值)
|
5 | */
|
6 | export declare function getWhatYear(date: string | Date | number, offset: number): Date;
|
7 |
|
8 | /**
|
9 | * 返回前几年或后几年的日期,可以指定年初(first)、年末(last)、月份(0~11),默认当前
|
10 | * @param date 字符串/日期/时间戳
|
11 | * @param year 年(默认当前年)、前几个年(数值)、后几个年(数值)
|
12 | * @param month 获取哪月:年初(first)、年末(last)、指定月份(0-11)
|
13 | */
|
14 | export declare function getWhatYear(date: string | Date | number, offset: number, month: number | 'first' | 'last'): Date;
|
15 |
|
16 | declare module './ctor' {
|
17 | interface XEUtilsMethods {
|
18 | getWhatYear: typeof getWhatYear;
|
19 | }
|
20 | }
|
21 |
|
22 | export default getWhatYear
|