You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
308 B
13 lines
308 B
import dayjs from 'dayjs'
|
|
|
|
export const middleDecimal = (char: string) => {
|
|
if (char.length < 10) {
|
|
return char
|
|
}
|
|
const len = char.length
|
|
return `${char.slice(0, 4)}...${char.slice(len - 4, len)}`
|
|
}
|
|
|
|
export const timeConvert = (time: number) => {
|
|
return dayjs().format('YYYY-MM-DD hh:mm:ss')
|
|
}
|
|
|