|
@@ -29,6 +29,10 @@ export function formatOffsetSec(s: number): string {
|
|
|
|
|
|
// 将LocaleTimeString 改为当天只显示 hh:mm:ss,之前的日期改为yyyy-mm-dd hh:mm:ss
|
|
|
export function formatTimeToShow(t: string | number) {
|
|
|
+ if (typeof t === 'string') {
|
|
|
+ // 苹果手机不支持
|
|
|
+ t = t.replace(/-/g, '/')
|
|
|
+ }
|
|
|
const d = new Date(t)
|
|
|
const now = new Date()
|
|
|
if (d.getFullYear() === now.getFullYear() && d.getMonth() === now.getMonth() && d.getDate() === now.getDate()) {
|