I'm making a simple website, in this website when I make a post or comment, I want it to display how old this comment is.
Example1: "I like apples" Added 10 days ago // This is the time, it should start at 0 seconds, when published it should then count.
Example2: "I like bananas" Added: 1 hour 3 minutes ago
Something in html would be good, for example I add a line such as ((Date xx - Date xx) start counting seconds) Once I publish this piece of text then it counts and i get "Added: 10 days ago".
Hope that was clear enough and thanks. I don't mind a solution in Java either as long as it's easy to copy paste since I'll need to make a lot of "comments".