serhii/ago

Transforms a given date into a human-readable "time ago" format with multilingual support. Example outputs include "1 hour ago", "2 days ago", "Just now", and "Online". The results are fully customizable to fit your specific needs

4.1.0 2025-06-18 10:49 UTC

README

Ago package

Ago Total Downloads License

Date/time converter into "n time ago" format that supports multiple languages, such as πŸ‡·πŸ‡Ί πŸ‡¬πŸ‡§ πŸ‡³πŸ‡± πŸ‡ΊπŸ‡¦ πŸ‡©πŸ‡ͺ. You can contribute any language that you wish easily by creating a pull request. When new PHP version comes out, this package will be updated to support it as soon as possible.

This package is well tested, optimized and already used in many production apps. It has shown itself pretty well. If you find any issues or bugs 🐞, please create an issue, and I'll fix it as soon as I can.

Follow the official documentation for more information

Supported Languages

Flag Language ISO 639-1
πŸ‡¬πŸ‡§ English en
πŸ‡·πŸ‡Ί Russian ru
πŸ‡ΊπŸ‡¦ Ukrainian uk
πŸ‡³πŸ‡± Dutch nl
πŸ‡©πŸ‡ͺ German de
πŸ‡¨πŸ‡³ Chinese Simplified zh

Quick Start

composer require serhii/ago

License

The Ago project is licensed under the MIT License

Development

Without Docker

You'll need to have Composer and PHP installed on your machine

Docker

Build an image

To build an image, navigate to the root of project that contains Dockerfile and run this command:

docker compose build app

Run the container

To run the container, navigate to the root of project that contains Dockerfile and run this command:

docker compose run --rm app