(dateTime, format = null, locale = null, strict = false)
| 19 | export const convertToSec = (dateTime) => dayjs(dateTime).unix(); |
| 20 | |
| 21 | export const initializeTime = (dateTime, format = null, locale = null, strict = false) => { |
| 22 | if (format && locale) { |
| 23 | return dayjs(dateTime, format, locale, strict); |
| 24 | } else if (format) { |
| 25 | return dayjs(dateTime, format, strict); |
| 26 | } else { |
| 27 | return dayjs(dateTime); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | export const startOfDay = (dateTime) => dayjs(dateTime).startOf('day'); |
| 32 |
no outgoing calls
no test coverage detected