Function
getDefaultFormatPrecisionOfInterval
(timeUnit: PrimaryTimeUnit)
Source from the content-addressed store, hash-verified
| 262 | } |
| 263 | |
| 264 | export function getDefaultFormatPrecisionOfInterval(timeUnit: PrimaryTimeUnit): PrimaryTimeUnit { |
| 265 | switch (timeUnit) { |
| 266 | case 'year': |
| 267 | case 'month': |
| 268 | return 'day'; |
| 269 | case 'millisecond': |
| 270 | return 'millisecond'; |
| 271 | default: |
| 272 | // Also for day, hour, minute, second |
| 273 | return 'second'; |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | export function format( |
| 278 | // Note: The result based on `isUTC` are totally different, which can not be just simply |
Tested by
no test coverage detected