diff options
Fixed date string constructor
1 files changed, 2 insertions, 0 deletions
| -rw-r--r-- | src/Generic/Date/Date.cpp | 2 |
diff --git a/src/Generic/Date/Date.cpp b/src/Generic/Date/Date.cpp index 0507b21..44080c1 100644 --- a/src/Generic/Date/Date.cpp +++ b/src/Generic/Date/Date.cpp @@ -23,8 +23,10 @@ Date::Date() : Date(01, 05, 2022) {} Date::Date(const char* str) { while (*str == ' ' && *str != '\0') str++; day = atoi(str); + str += 2; while (*str == ' ' && *str != '\0') str++; month = atoi(str); + str += 2; while (*str == ' ' && *str != '\0') str++; year = atoi(str); } |
