🗑️」 clean(ex00): cleaned debug

This commit is contained in:
y-syo
2025-09-01 16:35:02 +02:00
parent f9c38cfe86
commit 40ea42fe7b
2 changed files with 2 additions and 5 deletions

View File

@@ -14,13 +14,8 @@ Date::Date(void)
Date::Date(std::string str)
{
for (size_t i = 0; str[i]; ++i)
{
if (!isdigit(str[i]) && !((i == (str.length() - 6) || i == (str.length() - 3)) && str[i] == '-'))
{
std::cout << str.length() - 6 << i << std::endl;
throw std::invalid_argument("invalid date.");
}
}
_value = 0;
for (std::string::iterator it = str.begin(); it < str.end(); ++it)