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
Requires
- php: ^8.1
Requires (Dev)
- laravel/pint: ^1.18.3
- phpstan/phpstan: ^2.0.3
- phpunit/phpunit: ^10.5.38
- squizlabs/php_codesniffer: ^3.11.1
- symfony/var-dumper: ^6.4.15
This package is auto-updated.
Last update: 2026-07-01 07:46:15 UTC
README
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
Contribute
Build an Image
To build an image, navigate to the root of project and run this command.
With Podman:
podman-compose build
With Docker:
docker compose build
Run the Container
To run the container, navigate to the root of and run this command:
With Podman:
podman-compose up -d
With Docker:
docker compose up -d
Enter The Container
With Podman:
podman-compose exec app bash
With Docker:
docker compose exec app bash
Install Composer Dev Dependencies
After you entered the container, run composer install to install all development dependencies like phpunit, phpstan, etc.
Cleanup
After you are done working on a project, you can cleanup and run the command below to remove things like created networks for the current project.
With Podman:
podman-compose down
With Docker:
docker compose down