| 18 | } |
| 19 | |
| 20 | static time_t ParseDate(const char* date, const char* format) { |
| 21 | tm dateTm; |
| 22 | memset(&dateTm, 0, sizeof(tm)); |
| 23 | if (!strptime(date, format, &dateTm)) { |
| 24 | ythrow yexception() << "Invalid date string and format: " << date << ", " << format; |
| 25 | } |
| 26 | return mktime(&dateTm); |
| 27 | } |
| 28 | |
| 29 | static time_t ParseDate(const char* dateStr) { |
| 30 | if (strlen(dateStr) != 8) { |
no test coverage detected