Request a date and return the difference in days, months and years between the current date and the date entered.
This is what I have so far to catch the current date:
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1;
var yyyy = today.getFullYear();
if (dd < 10) {
dd = '0' + dd;
}
if (mm < 10) {
mm = '0' + mm;
}
var today = dd + '/' + mm + '/' + yyyy;
document.getElementById("DATE").value = today;
function mostrarFecha() {
alert(today);
}