| 90 | } |
| 91 | |
| 92 | function parseMail163Timestamp(rawText) { |
| 93 | const text = (rawText || '').replace(/\s+/g, ' ').trim(); |
| 94 | if (!text) return null; |
| 95 | |
| 96 | let match = text.match(/(\d{4})年(\d{1,2})月(\d{1,2})日\s+(\d{1,2}):(\d{2})/); |
| 97 | if (match) { |
| 98 | const [, year, month, day, hour, minute] = match; |
| 99 | return new Date( |
| 100 | Number(year), |
| 101 | Number(month) - 1, |
| 102 | Number(day), |
| 103 | Number(hour), |
| 104 | Number(minute), |
| 105 | 0, |
| 106 | 0 |
| 107 | ).getTime(); |
| 108 | } |
| 109 | |
| 110 | match = text.match(/\b(\d{1,2}):(\d{2})\b/); |
| 111 | if (match) { |
| 112 | const [, hour, minute] = match; |
| 113 | const now = new Date(); |
| 114 | return new Date( |
| 115 | now.getFullYear(), |
| 116 | now.getMonth(), |
| 117 | now.getDate(), |
| 118 | Number(hour), |
| 119 | Number(minute), |
| 120 | 0, |
| 121 | 0 |
| 122 | ).getTime(); |
| 123 | } |
| 124 | |
| 125 | return null; |
| 126 | } |
| 127 | |
| 128 | function getMailTimestamp(item) { |
| 129 | const candidates = []; |