Код: Выделить всё
const auto time = std::chrono::system_clock::from_time_t(std::mktime(&tm));
const std::string s = std::format("{:%d %b %Y}", time);
//Example s: 20 March 1990
Что-то вроде этого :
Код: Выделить всё
const std::string data = "20 March 1990";
const auto time = std::make_time_point("{:%d %b %Y}", data);
Код: Выделить всё
int a = 0;
std::string b = 0;
int c = 0;
const std::string data = "20 March 1990";
std::reverse_format("{} {} {}", data, &a, &b, &c);
//Output: a = 20, b = March, c = 1990
Подробнее здесь: https://stackoverflow.com/questions/784 ... -stdformat