thymeleaf / thymeleaf-extras-java8time

Thymeleaf "extras" dialect for formatting and creating Java 8 Time API objects
Apache License 2.0
105 stars 34 forks source link

Idea: Convert to time ago in words #24

Closed aparsons closed 2 years ago

aparsons commented 5 years ago

The PHP framework CakePHP has a date formatting method to convert a date into a human-friendly string like 2 months, 2 weeks, 6 days ago. What are thoughts on adding similar functionality?

jmiguelsamper commented 5 years ago

I will leave this ticket open for future discussion but currently I see a couple of difficulties on implementing it:

  1. We try to mimic the Thymeleaf core #dates utilities but it currently doesn't have a similar feature
  2. While getting an English language implementation seems quite straightforward, localised implementations for other languages might be difficult to achieve.
danielfernandez commented 2 years ago

Closing for now given lack of reported impact from users, in order to simplify towards integration in Thymeleaf core.