Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Is date greater than 18 years old javascript

function isDate18orMoreYearsOld(day, month, year) {
    return new Date(year+18, month-1, day) <= new Date();
}
Source by codereview.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #Is #date #greater #years #javascript
ADD COMMENT
Topic
Name
5+5 =