How to convert days to years in JavaScript

1 Answer

0 votes
const days = 1289;
   
const years = days / 365.0;
 
console.log("Years = " + years);


 
 
/*
run:
               
"Years = 3.5315068493150683"
 
*/ 

 



answered Jul 16, 2021 by avibootz

Related questions

...