How do I calculate relative time?

Posted by Jeff Atwood on Stack Overflow See other posts from Stack Overflow or by Jeff Atwood
Published on 2008-07-31T23:55:37Z Indexed on 2010/04/20 0:43 UTC
Read the original article Hit count: 275

Filed under:
|
|
|

Given a specific DateTime value, how do I display relative time, like

  • 2 hours ago
  • 3 days ago
  • a month ago

etc, etc...?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET