getWhatYear.d.ts 1022 B

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