Methods

AgeChecker class

com.reintroducing.utils.AgeChecker

 

 

 

Overview

Author

Calvin Ly [http://www.calvinly.com]
Conversion to class by Matt Przybylski [http://www.reintroducing.com]

Version

1.0

Description

A utility class that uses a static method to check whether a user's age is older than the age to check against.

Methods

 

checkAge

Usage

AgeChecker.checkAge($ageToCheck, $month, $day, $year)

Description

Checks whether the user's age is permissible or not. The month and day can be passed in with leading zeros or not. The year should be passed in as the full year (ex: 1983).

Parameters

$ageToCheck
The age you want to test against
$month
The user's input month
$day
The user's input day
$year
The user's input year

Returns

A boolean value that states whether the age check has passed or not.