parent
54643fac09
commit
d190b869cb
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,17 @@ |
|||||||
|
import format from 'date-fns/format' |
||||||
|
|
||||||
|
type prepareTimeFormat = { |
||||||
|
date: Date, |
||||||
|
isNeedFormatTimeChanged: boolean, |
||||||
|
time: string, |
||||||
|
} |
||||||
|
|
||||||
|
export const getPrepareTimeFormat = ({ |
||||||
|
date, |
||||||
|
isNeedFormatTimeChanged, |
||||||
|
time, |
||||||
|
}: prepareTimeFormat) => ( |
||||||
|
isNeedFormatTimeChanged |
||||||
|
? format(date, 'hh:mm aaa') |
||||||
|
: time |
||||||
|
) |
||||||
Loading…
Reference in new issue