fork download
  1. #include <sstream>
  2. #include <iostream>
  3. #include <iomanip>
  4. int main()
  5. {
  6. struct std::tm tm{};
  7. std::istringstream ss("25Jun20");
  8. ss >> std::get_time(&tm, "%e%b%C");
  9. std::time_t time = mktime(&tm);
  10. std::cout << tm.tm_year + 2000 << std::endl;
  11. }
Success #stdin #stdout 0.01s 5536KB
stdin
Standard input is empty
stdout
2020