function getLastThreeMonthsTimestamps() {
const now = new Date();
const threeMonthsAgo = new Date();
threeMonthsAgo.setMonth(threeMonthsAgo.getMonth() - 3);
return {
start: threeMonthsAgo.getTime(),
end: now.getTime()
};
}
const timestamps = this.getLastThreeMonthsTimestamps();
console.log(timestamps.start); // 近三个月开始时间戳
console.log(timestamps.end); // 当前时间戳
01-10
1249

05-19