fix(09): checking other month
This commit is contained in:
parent
5cedee4736
commit
5edc9a2fa4
1 changed files with 3 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/04/08 12:15:32 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++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
if (month == month_30[i] && day > "30") {
|
if (month == month_30[i] && day > "30") {
|
||||||
*error_code = NO_DATE;
|
*error_code = NO_DATE;
|
||||||
|
} else if (day > "31") {
|
||||||
|
*error_code = NO_DATE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue