timestamp.d.ts 546 B

123456789101112131415161718192021
  1. import { XEUtilsMethods } from '../xe-utils'
  2. /**
  3. * 将日期转为时间戳
  4. * @param date 字符串/日期/时间戳
  5. * @param format 解析格式 yyyy MM dd HH mm ss SSS
  6. */
  7. export declare function timestamp(date: string | Date | number, format?: string): number;
  8. declare module '../xe-utils' {
  9. interface XEUtilsMethods {
  10. /**
  11. * 将日期转为时间戳
  12. * @param date 字符串/日期/时间戳
  13. * @param format 解析格式 yyyy MM dd HH mm ss SSS
  14. */
  15. timestamp: typeof timestamp;
  16. }
  17. }
  18. export default timestamp