Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Time Ago Bundle Laravel Package

eschmar/time-ago-bundle

TimeAgoBundle provides a simple Twig filter for Symfony that expresses time differences in words, returning actual dates beyond ±7 days. Supports many languages, configurable date format, and future times. Install via Composer; works with Symfony 2.8–5.x.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Relative timestamp UX for activity surfaces. The |ago Twig filter turns any DateTime into human-readable copy ("3 minutes ago", "in 4 hours"), which is the default pattern users now expect in comment threads, notification centers, audit logs, activity feeds, and "last updated" badges. This is a small, well-understood feature slice — the kind that shows up in a dozen places across a product and is worth standardizing rather than hand-rolling per view.
  • Localization readiness for global launches. Shipping 26 locale translations (Belarusian through Vietnamese) out of the box is the real product asset here. If your roadmap includes EU, LATAM, or APAC markets, adopting this pattern early avoids a later i18n retrofit across every timestamp in the UI.
  • Build vs. buy. This is a clear "buy" candidate if you're on Symfony: the feature is commodity, the implementation is ~50 lines of datetime math, and the bundled translation catalog is the only genuinely expensive part to reproduce. Spending engineering days on relative-time localization is a poor use of sprint capacity when a MIT-licensed drop-in exists.
  • Graceful degradation policy. The ±7-day window (relative within a week, absolute date beyond) is a product rule, not just a technical one. Adopting the package bakes in a defensible default — "3 days ago" is friendly, "8 days ago" is ambiguous — and gives you a single config point (format) to tune the fallback per surface.
  • Feature-flag / scope confidence. Low integration cost means this can ride along with an existing release rather than consuming a roadmap slot.

Important caveat for the decision record: despite the framing, this is a Symfony bundle, not a Laravel package. It ships a bundle class, a config.yml tree, and a Twig extension — none of which plug into Laravel's service container or Blade. In a Laravel codebase, the equivalent build decision is Carbon::diffForHumans() (already a transitive dependency), which supports the same relative/absolute behavior and is actively maintained. The "buy" recommendation applies only if the target application is Symfony.

When to Consider This Package

Adopt when:

  • The application is Symfony 5.x (v2.0.0) and renders timestamps through Twig. Symfony 4.x and 2.8/3.4 are covered by older major lines, but pinning to those is a maintenance smell.
  • You need multi-locale relative time and don't want to own a translation catalog. This is the strongest single reason to reach for it.
  • The UX calls for the ±7-day relative-then-absolute convention. If your design instead wants "3 weeks ago" indefinitely, the package fights you.
  • You want the smallest possible surface area: one filter, one config key, no ORM coupling, no service wiring beyond bundle registration.
  • Timestamps are formatted at the view layer — i.e., you're passing DateTime objects into templates rather than pre-rendering strings in controllers or API resources.

Look elsewhere when:

  • You're on Laravel. Do not adopt. Use diffForHumans() / CarbonInterface — same output, actively maintained, zero new dependency.
  • You're on Symfony 6/7. No release targets it; last publish was March 2022. You'd be running an unmaintained bundle against a major framework version it was never tested on. Verify compatibility or budget for a fork.
  • Maintenance risk is unacceptable. 17 stars, 0 dependents, and a 2022 last release is a bus-factor of roughly one. For a long-lived product, a vendored 50-line Twig extension may be the safer buy-in.
  • You need JS-side rendering. API-driven SPAs and Livewire/Inertia frontends need client-side relative time (e.g., Intl.RelativeTimeFormat); a server-side Twig filter is the wrong layer.
  • You need sub-day granularity configurable per surface, or custom phrasing ("moments ago", "just now" brand voice) beyond the translation files.
  • You require future-date handling at scale — supported ("in 4 hours"), but only inside the same 7-day envelope.

How to Pitch It (Stakeholders)

To executives (30 seconds):

This is a tiny, free, MIT-licensed component that gives users friendly timestamps — "3 minutes ago" instead of "2024-11-08 14:22:31" — across 26 languages. It's the difference between an interface that feels alive and one that feels like a database dump. The cost is effectively zero: no license fee, no vendor negotiation, no meaningful engineering lift. One constraint: it only fits our Symfony services. If the work in question is Laravel, we get the same result from code we already ship, at no additional cost.

To engineering:

Symfony 5 + Twig bundle providing an |ago filter over DateTime. Single config key for the fallback format, bundle registration is one line, no ORM or container coupling. Translations for 26 locales are the actual value — that's the part we'd otherwise spend a sprint rebuilding badly.

Two things to weigh honestly. First, it's unmaintained since March 2022 with essentially no downstream adoption, so treat it as vendored code: pin the version, and expect to fork if we ever move to Symfony 6/7. Second, the whole behavior is ~50 lines of datetime arithmetic — if the dependency-review policy is strict, lifting the filter and the translation YAML into our own src/ is a half-day of work with strictly better longevity.

Recommendation: adopt on Symfony 5 where the translation catalog saves us real time; reimplement inline on Symfony 6+ or on Laravel.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
takashato/laravel-vietqr
aitor24/laralang
kraenzle-ritter/entity-relations
dindigital/din-image
pomirleanu/image-colors
sawmainek/laravel-api-generator
delatbabel/jsonresponses
mouhamedfd/permissions-generator
eduplus/qr
laravel2580/idehelpers
delatbabel/viewpages
anavel/gettext
muhamadrezaar/highcharts
delatbabel/keylists
frankkessler/salesforce-laravel-oauth2-rest
anavel/foundation
wdmtech/enviricons
eii/laravel-captcha
muka/shape-reader
tdt/json