Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Javascript :: js get parameters 
Javascript :: permutation javascript 
Javascript :: NameError: uninitialized constant Shoulda 
Javascript :: how to make a vowel counter in javascript 
Javascript :: put 0 in front of month number javascript 
Javascript :: nice react native shadow 
Javascript :: element ui handle enter key 
Javascript :: js find longest word in string function 
Javascript :: express return json 
Javascript :: json array to string in postgresql 
Javascript :: replace element from string javascript 
Javascript :: how to change css style on click 
Javascript :: jquery get meta value 
Javascript :: javascript search dictionary by value 
Javascript :: vue 3 global variable 
Javascript :: how to remove duplicate values in array of objects using javascript 
Javascript :: next js Pages with Dynamic Routes 
Javascript :: javascript create range with a loop 
Javascript :: Disable Initial Sorting in Datatable 
Javascript :: bootstrap 5.1 3 tooltip not working 
Javascript :: local storage ha 
Javascript :: get full month from date javascript 
Javascript :: convert elements to array javascript 
Javascript :: validate email input javascript onchange 
Javascript :: js detect link in string 
Javascript :: jquery get left position 
Javascript :: random rgba color javascript except black 
Javascript :: generate guard angular 
Javascript :: how to find length of array in javascript without using length method 
Javascript :: loop in object javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =