#include <iostream>
#include <chrono>
#include <iomanip>
int main() {
// Get the current date
auto today = std::chrono::system_clock::now();
auto today_time_t = std::chrono::system_clock::to_time_t(today);
std::tm today_tm = *std::localtime(&today_time_t);
// Add six months to the current date
today_tm.tm_mon += 6;
// Normalize the date (handles overflow of months into years)
std::mktime(&today_tm);
// Print the new date
std::cout << "Date six months from now: "
<< std::put_time(&today_tm, "%Y-%m-%d") << std::endl;
}
/*
run:
Date six months from now: 2025-12-11
*/