1. android 与 ios 时间上的区别

1.1. 区别

  • adroid:时间一般以 YYYY - MM - DD hh:mm:ss 显示,年月日以横线分隔

  • ios:时间以 YYYY/MM/DD hh:mm:ss 显示,年月日以斜线分隔

1.2. 兼容处理

const finishTime = '2022-12-12 12:12:12'
if (new Date(finishTime.replace(/-/g, '/')).getTime() <= new Date().getTime()) {
  ...
}
Copyright © tomgou 2022 all right reserved,powered by Gitbook该文章修订时间: 2023-08-28 17:33:23

results matching ""

    No results matching ""