Toggle navigation
LaunchDog QnA
Submit
한국어
日本語
Calculate relative time in C#
1386
Given a specific
DateTime
value, how do I display relative time, like:
2 hours ago
3 days ago
a month ago
Jeff Atwood
출처
c#
datetime
time
datediff
relative-time-span
What if you want to calculate a relative time from now to Future? -
Jhonny D. Cano -Leftware-
moment.js is a very nice date parsing library.. You can consider using that (server side or client side), depending on your needs. just fyi because nobody mentioned it here -
code ninja
There is the .net package
github.com/NickStrupat/TimeAgo
which pretty much does what is being asked. -
Rossco
Linked
asp.net mvc time ago in words helper [duplicate]
Related
Calculate relative time in C#
Latest
C# Linq Group By on multiple columns [duplicate]
What result i should return? [duplicate]
Is it better to return null or empty collection?
Return an empty collection when Linq where returns nothing
C# How can I prevent in this code that this error message occurs: Sequence contains no elements? [duplicate]
What does LINQ return when the results are empty
What is wrong in this LINQ Query, getting compile error
Implicit conversion error in LINQ
update a List<Object> with LINQ [duplicate]
Update all objects in a collection using LINQ
Comparing date parts in LINQ
LINQ to Entities group-by failure using .date
Linq-select group by & count
Linq - Grouping by date and selecting count
how to group by multiple columns using linq [duplicate]
Group By Multiple Columns
How to find peaks in a spectrogram Python [duplicate]
Peak detection in a 2D array
What's the quickest way to parallelize code?
Which parallel programming APIs do you use? [closed]