📜  日期是否大于 18 岁 javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:00.251000             🧑  作者: Mango

代码示例1
function isDate18orMoreYearsOld(day, month, year) {
    return new Date(year+18, month-1, day) <= new Date();
}