Answer the question
In order to leave comments, you need to log in
How to know the exact time?
I have a date, in this form: 2017-01-07T03:48:17+03:00
I need to find out how many years, months and days have passed since that moment.
If someone throws off the link to the manual on "Date", then already read. I didn't understand a single thing.
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
const one = new Date().getTime()
const two = new Date('2017-01-07T03:48:17+03:00').getTime()
const ms = one - two
const sec = ms / 1000
const hours = sec / 3600
const days = hours / 24
// и так далее
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question