I am just doing a question and answer web app. I have a date like October 10th 2018, 10:04
but rather than display the date as its form i want to change like today, yesterday, 2 days ago
. Depending on the date it far from the current date?
Asked
Active
Viewed 18 times
0
![](../../users/profiles/8443899.webp)
Henok Tesfaye
- 4,681
- 5
- 23
- 53
-
2If you are using moment, it has a method fromNow() – sridhar.. Oct 10 '18 at 17:24
-
Yeah i used moment. Can you show me in a code? – Henok Tesfaye Oct 10 '18 at 17:25
-
https://momentjs.com/docs/#/displaying/fromnow/ . link to moment library – sridhar.. Oct 10 '18 at 17:26