UNPKG

apass-opensdk-hugong

Version:

飞书Apass低代码平台-飞书开放平台-相关的接口整合和常用的方法整合

40 lines (34 loc) 940 B
// Date_.d.ts export = Date_; declare class Date_ { constructor(hg: any); /** * 把日期字符串解析成时间戳(毫秒) */ dateStringToTimestamp(dateString: string): number; /** * 返回 moment-timezone 实例(已默认 Asia/Shanghai) */ moment(date?: string | number | Date): import('moment-timezone').Moment; /** * 把日期按指定格式输出(默认 YYYY-MM-DD HH:mm:ss) */ format(date?: string | number | Date, format?: string): string; /** * 当前时间按指定格式输出(默认 YYYY-MM-DD HH:mm:ss) */ nowFormat(format?: string): string; /** * 把起止日期按指定月份跨度拆分成若干段 */ splitDateRange( startDate: string, endDate: string, splitMonths: number ): Array<{ begin: string; // yyyy-mm-dd end: string; // yyyy-mm-dd len: number; // 实际月份数 days: number; // 实际天数 }>; }