Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how many days old am i

let date = [2000, 1, 1]
// date[0] = year
// date[1] = month
// date[2] = date
console.log((new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()) - new Date(date[0], date[1] - 1, date[2])) / 1000 / 60 / 60 / 24)
 
PREVIOUS NEXT
Tagged: #days
ADD COMMENT
Topic
Name
3+5 =