效果如下
核心原理是:
把user/profile/60658c0e0000000001000685 上的ID可以转成时间戳
function formatTimestampFromHexId(hexId) { if (!/^[a-fA-F0-9]{24}$/.test(hexId)) return null; const timestampHex = hexId.slice(0, 8); const timestamp = parseInt(timestampHex, 16); const date = new Date(timestamp * 1000); const year = String(date.getFullYear()).slice(2); const month = String(date.getMonth() + 1).padStart(2, '0'); const day = String(date.getDate()).padStart(2, '0'); return `${year}.${month}.${day}`; } 或者使用现成的chrome插件:小红书日期查看