
export function transfterStrToDate(str: string) {
  const arr = str.split(' ')
  if (arr.length === 2) {
    let [start, end] = arr
    start = start.replace('：', ':').replace('早上', '').replace('下午', '')
    end = end.replace('：', ':').replace('早上', '').replace('下午', '')
    const d = new Date()
    start = `${d.getFullYear()}/${d.getMonth() + 1}/${d.getDate()} ${start}`
    end = `${d.getFullYear()}/${d.getMonth() + 1}/${d.getDate()} ${end}`
    const startDate = new Date(start)
    const endDate = new Date(end)
    return [startDate, endDate]
  } else {
    return undefined
  }
}