日期时间工具库。基于 date-fns。
| Enumeration | Description |
|---|---|
| FormatDatePlaceholder | 日期格式化占位符。 |
| Function | Description |
|---|---|
| anyToDate(value) | 增强版的 toDate,支持: - 秒时间戳、毫秒时间戳; - Date 实例; - 符合 ISO 标准的时间字符串。 |
| formatDate(date, renderer) | 格式化日期。 |
| formatDistanceAgo(date) | 将时间转化为 xxx前 表示。 |
| formatDistancePlus(date, baseDate) | 将时间转化为 xxx前/后 表示。 |
| intervalToRestrictiveDuration(start, end, target) | |
| numeralDayToChineseDay(day) | 数字星期转中文星期。0 和 7 都视为星期日。 |
| Interface | Description |
|---|---|
| IntervalToRestrictiveDurationResult |
| Variable | Description |
|---|---|
| ms |
| Type Alias | Description |
|---|---|
| FormatDateRenderer | 日期格式化渲染器。 |
| IntervalToRestrictiveDurationTarget | |
| NumeralDay | 数字星期。 |