export function getTimestamp(date) {
  if (typeof date === 'string') {
    return ((new Date(date.replaceAll("-", "/"))).getTime())
  }
  return ((new Date(date)).getTime())
}

export function getCountDownTime(target) {
  const time = getTimestamp(target) - getTimestamp(Date.now())
  return time > 0 ? time : 0
}
