(timestamp: number | string, exact = true)
| 69 | } |
| 70 | |
| 71 | export const getFormattedTime = (timestamp: number | string, exact = true) => { |
| 72 | const ms = typeof timestamp === 'string' ? new Date(timestamp).getTime() : timestamp |
| 73 | |
| 74 | return format(ms, exact ? 'HH:mm:ss.SSS' : 'HH:mm') |
| 75 | } |
| 76 | |
| 77 | export const getFormattedDate = (timestamp: number | string) => { |
| 78 | const ms = typeof timestamp === 'string' ? new Date(timestamp).getTime() : timestamp |
no outgoing calls
no test coverage detected