Weave Code
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

Human Date Laravel Package

cocur/human-date

Transforms DateTime values into human‑readable strings like Today, Tomorrow, Yesterday, Next Tuesday, or formatted dates. Supports translated strings via a translation interface (including Symfony Translation). Lightweight, no external dependencies, PSR‑4, PHP 5.4+ and HHVM.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • User Experience (UX) Enhancement: Improves readability of dates in logs, notifications, or user-facing interfaces (e.g., "3 days ago" instead of "2023-10-15T12:00:00Z"). Aligns with accessibility and simplicity goals.
  • Localization & Internationalization (i18n): Simplifies date formatting for multilingual apps by abstracting human-readable strings (e.g., "yesterday" vs. "hier" in German).
  • Roadmap Efficiency: Accelerates development for features requiring relative time (e.g., activity feeds, event timelines) without reinventing date parsing logic.
  • Build vs. Buy: Justifies buying this lightweight package over custom code for basic human-readable dates, freeing dev resources for higher-value work.
  • Use Cases:
    • Admin dashboards (e.g., "Last updated: 2 hours ago").
    • User notifications (e.g., "Your order shipped 1 day ago").
    • Debugging/logging (e.g., human-readable timestamps in error reports).

When to Consider This Package

  • Adopt if:

    • Your app needs simple, relative date formatting (e.g., "2 minutes ago") with minimal dependencies.
    • You’re using Laravel/PHP and want to avoid bloated libraries like Carbon for basic use cases.
    • Your team lacks bandwidth to build/maintain custom date formatting logic.
    • You prioritize MIT-licensed, open-source solutions with no active maintenance concerns (though last release was 2014, it may suffice for stable use).
  • Look elsewhere if:

    • You need advanced date manipulation (time zones, parsing, arithmetic) → Use Carbon or PHP IntlDateFormatter.
    • You require active maintenance or modern PHP (8.x) support.
    • Your use case demands highly customizable or localized formats (e.g., "in 3 days" vs. "3 days from now").
    • You’re building a time-sensitive product (e.g., scheduling) where precision matters.

How to Pitch It (Stakeholders)

For Executives: "This package lets us deliver cleaner, more intuitive date displays (e.g., ‘Yesterday’ instead of timestamps) with almost no effort. It’s a low-risk, high-reward way to improve UX in notifications, logs, and dashboards—saving dev time while keeping costs near zero. Think of it as ‘autocomplete for dates.’"

For Engineering: "A 2KB MIT-licensed package that plugs into Laravel’s date handling. No dependencies, no fluff—just HumanDate::parse($date) to get ‘3 hours ago.’ Ideal for quick wins on UX polish or i18n. Tradeoff: Last updated in 2014, but stable for basic use. For anything complex, we’d still use Carbon."

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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui