I have here a code that performs a javascript operation. It determines the maximum date of birth that can be entered on a form. The rule is that you can only register who is 18 years and over.
var d = new Date();
var year = d.getFullYear();
var month = d.getMonth();
var day = d.getDate();
var dtMax = new Date(year - 18, month, day);
How to pass this date from Wed May 03 2000 00:00:00 GMT-0400 (EDT)
to 2000-05-03
- International Standard ISO? The toISOString()
method should return the desired value.This value will be used to limit the maximum date of a