function nativeParseDate(text) {
if ('text match "the date time string format"') {
if ('text is date only') {
return 'UTC time'
} else {
return 'local time'
}
} else {
return 'I am guessing the date...'
}
}
// do you know what are the differences
new Date('1990/01/01');
new Date('1990-01-01');
new Date('1990-01-01 10:30');
这个 JS 代码能看懂的是高手
最新推荐文章于 2024-09-06 23:41:09 发布