function getFormattedDateTime(includeTime = false) {
  const date = new Date();
  const weekdays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  
  const year = date.getFullYear();
  const month = date.getMonth() + 1;
  const day = date.getDate();
  const weekday = weekdays[date.getDay()];
  
  let result = `${year}年${month}月${day}日 ${weekday}`;
  
  if (includeTime) {
    const pad = n => n.toString().padStart(2, '0');
    result += ` ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
  }
  
  return result;
}

export default getFormattedDateTime