fix(09): checking other month

This commit is contained in:
Raphael 2025-05-18 21:35:34 +02:00
parent 5cedee4736
commit 5edc9a2fa4

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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;
}
}
}