Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Formatting Date like moment.js in .NET

Is there any libraries for .NET that works similar to moment.js but for server-side formatting?

EDIT: So i can do something like : someDate.FromNow(); and returns things like : in 2 years, next year, in 3 month, in 2 weeks, in 2 days, in 12 hours, tomorrow, in 30 minutes, in 5 seconds, right now, less than 1 minute ago, 1 minute ago, 1 hour ago, yesterday, 3 days ago, 1 week ago, 1 month ago, 1 month ago, etc.

like image 218
Bart Calixto Avatar asked Feb 18 '23 03:02

Bart Calixto


1 Answers

Finally found the answer: Humanizer take care of this.

https://github.com/MehdiK/Humanizer

Thanks everyone.

like image 77
Bart Calixto Avatar answered Mar 11 '23 03:03

Bart Calixto