From 5edc9a2fa4dffb698a985486520d8e2974a2b1d5 Mon Sep 17 00:00:00 2001 From: Raphael Date: Sun, 18 May 2025 21:35:34 +0200 Subject: [PATCH] fix(09): checking other month --- cpp09/ex00/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpp09/ex00/main.cpp b/cpp09/ex00/main.cpp index 1982e94..fe9c851 100644 --- a/cpp09/ex00/main.cpp +++ b/cpp09/ex00/main.cpp @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/08 12:15:32 by rparodi #+# #+# */ -/* Updated: 2025/05/02 15:22:16 by rparodi ### ########.fr */ +/* Updated: 2025/05/18 21:35:25 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -137,6 +137,8 @@ std::string check_date(std::string name, enum error_code *error_code) { for (int i = 0; i < 4; i++) { if (month == month_30[i] && day > "30") { *error_code = NO_DATE; + } else if (day > "31") { + *error_code = NO_DATE; } } }