brick / date-time

Date and time library for PHP
MIT License
323 stars 29 forks source link

Human-readable auto-scaling duration #42

Closed Bilge closed 2 years ago

Bilge commented 2 years ago

Despite all these time and date classes, it appears there is no method to convert a period to a human-readable format, e.g. 2 years ago. Moreover, it would be beneficial for it to automatically scale, e.g. 2 months instead of 60 days.

To be clear, I am thinking of something akin to moment.duration().humanize().

Bilge commented 2 years ago

It seems I should just use Chronos instead.