
  function generateDateRange(days, startDate = new Date()) {
    const dates = [];
    const currentDate = new Date(startDate);
    
    currentDate.setDate(currentDate.getDate() - days + 1);
    
    for (let i = 0; i < days; i++) {
      dates.push(new Date(currentDate).toISOString());
      currentDate.setDate(currentDate.getDate() + 1);
    }
    
    return dates;
  }
  
  function getRandomRecentDate() {
    const start2025 = new Date('2025-01-01');
    const now = new Date();
    const timeDiff = no