# Looking to make a age verifyer

**URL:** <https://forum.kirupa.com/t/looking-to-make-a-age-verifyer/164752>\
**Category:** Uncategorized\
**Created:** [October 4, 2005, 3:21pm UTC](https://forum.kirupa.com/t/looking-to-make-a-age-verifyer/164752 "2005-10-04T15:21:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkcidstudio](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@pkcidstudio](https://forum.kirupa.com/u/pkcidstudio)\
**Post date:** [October 4, 2005, 3:21pm UTC](https://forum.kirupa.com/t/looking-to-make-a-age-verifyer/164752/1 "2005-10-04T15:21:58Z")

</div>

still searching for a accurate age verify code. i have one but it is only for the year, it would be great if i could get one to the day. here is the code i have already to maybe give you a head start.

> ========================================  
> function verifyAge(userMonth:Number, userDay:Number, userYear:Number) {  
> trace(userMonth+userDay+userYear);  
> var today\_date:Date = new Date();  
> var month:Number = today\_date.getDate();  
> var today:Number = today\_date.getMonth();  
> var year:Number = today\_date.getFullYear();  
> trace(year-userYear);  
> if (year-userYear\<21) {  
> trace(“u too young”);  
> }  
> }

then you would pass input field values to the function:

# on (release) { verifyAge(‘09’, ‘26’, ‘1985’); }

hope helps  
ipaq

any an all help would be great. here is a example of what i want to mimic  
[http://www.millerbrewing.com/](http://www.millerbrewing.com/)
