[ruby/date] Check month range as civil

This commit is contained in:
Nobuyoshi Nakada 2022-10-27 14:12:27 +09:00 committed by git
parent cb80ee7a4a
commit 739ad81ff1
1 changed files with 2 additions and 0 deletions

View File

@ -761,6 +761,8 @@ c_valid_civil_p(int y, int m, int d, double sg,
if (m < 0)
m += 13;
if (m < 1 || m > 12)
return 0;
if (d < 0) {
if (!c_find_ldom(y, m, sg, rjd, ns))
return 0;