function get_current_age(date) { return ((new Date().getTime() - new Date(date)) / (24 * 3600 * 365.25 * 1000)) | 0; } alert(get_current_age('1986-09-18'));