Function getDateDifference
- getDateDifference(oldDate, nowDate?, type?): number | {
days: number;
hours: number;
minutes: number;
seconds: number;
} Parameters
- oldDate: string | Date
Optional
nowDate: string | Date- type:
| "ALL"
| "all"
| "day"
| "days"
| "hour"
| "hours"
| "minute"
| "minutes"
| "second"
| "seconds"
| "DAY"
| "DAYS"
| "HOUR"
| "HOURS"
| "MINUTE"
| "MINUTES"
| "SECOND"
| "SECONDS" = 'all'
Returns number | {
days: number;
hours: number;
minutes: number;
seconds: number;
}
两个时间差距计算