#include <iomanip> // put_time
#include <sstream>
#include <iostream>
std::string getMonthName(const std::tm& date) {
std::ostringstream oss;
oss << std::put_time(&date, "%B");
return oss.str();
}
int main() {
std::time_t t = std::time(nullptr);
std::tm* now = std::localtime(&t);
std::string monthName = getMonthName(*now);
std::cout << "Current month: " << monthName << std::endl;
}
/*
run:
Current month: January
*/