The getYears function is established to get years to now.
var date=Date.parse("1980/01/01","yyyy/MM/dd");
var years=date.getYears();
Calling | Returning |
---|---|
{Date} . getYears ( ) | Number |
{Date} . getYears ( current ) | Number |
Parameters | Type | Description |
---|---|---|
current | Date | A date as the current date. |