Using “number of days” from a SQL database, how can I return it in a more human-friendly format?
For example, for many users, this number is pretty high. Instead of them seeing “438 days”, I would like to display: “1 year, 2 months, 1 week, 5 days.”
Thank you!
Given we don’t know start/end dates taking into account days in month or leap years is an exercise in futility.