Tuesday December 1st

Monday November 30th

2 Kicks

How to get a pretty date in c#

Have you ever wondered how some sites were able to show the bottom of each post, a formatted date (pretty date) which estimates the number of days, months or years between the publication of the post and today? e.g. "posted 5 weeks ago" This snippet will allow you to do this easily! You can improve this code by adding, for example, a dictionary of resources for the different languages ​​of your application or website.


Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network