|
@@ -1195,7 +1195,15 @@ U.MD.D.getNotice = function () {
|
|
|
|
|
|
|
|
|
function formatDate(_date) {
|
|
|
- let date = new Date(_date)
|
|
|
+ let date;
|
|
|
+ try {
|
|
|
+ // 尝试直接使用new Date()构造
|
|
|
+ date = new Date(_date);
|
|
|
+ } catch (error) {
|
|
|
+ // 如果失败,尝试使用Date.parse()
|
|
|
+ let timestamp = Date.parse(_date);
|
|
|
+ date = new Date(timestamp);
|
|
|
+ }
|
|
|
const year = date.getFullYear();
|
|
|
const month = (date.getMonth() + 1).toString().padStart(2, "0");
|
|
|
const day = date.getDate().toString().padStart(2, "0");
|