getWhatMonth.d.ts 975 B

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