Download the PHP package nowo-tech/relative-time-bundle without Composer
On this page you can find all versions of the php package nowo-tech/relative-time-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nowo-tech/relative-time-bundle
More information about nowo-tech/relative-time-bundle
Files in nowo-tech/relative-time-bundle
Package relative-time-bundle
Short Description Format DateTime values as localized relative time strings (e.g. just now, 5 minutes ago) for Symfony and Twig.
License MIT
Homepage https://github.com/nowo-tech/RelativeTimeBundle
Informations about the package relative-time-bundle
Relative Time Bundle
⭐ Found this useful? Install from Packagist and give it a star on GitHub.
Symfony bundle that formats a DateTime (or timestamp / date string) as a localized relative time string: just now, 5 minutes ago, in 2 hours, hace un momento, hace 3 días, and so on.
This bundle is FrankenPHP worker mode friendly.
Features
- RelativeTimeFormatter service with past and future wording
- Twig filters/functions:
relative_timeandago - i18n catalogues for
en,es,it,fr,pt,de,nl(domainNowoRelativeTimeBundle) - Configurable
just_now_threshold_seconds,max_unit, locale and timezone defaults - App-level translation overrides (REQ-I18N-001)
Quick example
Requirements
- PHP >= 8.2, < 8.6
- Symfony 7.4+ or 8.x (
symfony/translation, Twig) - Twig 3.8+ or 4.x
Demo
FrankenPHP worker mode for production demos is documented in DEMO-FRANKENPHP.md.
Documentation
- Installation
- Configuration
- PSR evaluation (REQ-CS-007)
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
- GitHub Actions CI requirements
- Demo (Symfony 7 & 8) — run
make -C demo up-symfony8from the bundle root. - Demo with FrankenPHP (development and production)
Tests and coverage
| Language | Lines (approx.) | Command |
|---|---|---|
| PHP | 100% | make test-coverage |
| TypeScript | N/A | — |
| Python | N/A | — |
CI enforces PHP coverage at 100%.
Version policy
The Composer package name is nowo-tech/relative-time-bundle. Source code and issues are in the GitHub repository nowo-tech/RelativeTimeBundle.
We follow Semantic Versioning. See Security policy.
License
MIT. See LICENSE.
All versions of relative-time-bundle with dependencies
symfony/config Version ^7.4 || ^8.0
symfony/dependency-injection Version ^7.4 || ^8.0
symfony/http-kernel Version ^7.4 || ^8.0
symfony/translation Version ^7.4 || ^8.0
symfony/translation-contracts Version ^3.0
twig/twig Version ^3.8 || ^4.0