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

Php Date Laravel Package

assoconnect/php-date

A lightweight PHP AbsoluteDate object for handling dates without time or timezone concerns. Built on DateTime, it represents a simple calendar day—perfect for birthdays and other timezone-agnostic dates—with easy formatting and timezone-aware creation.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Expansion: Enables precise date/time handling for scheduling, reminders, or time-sensitive workflows (e.g., event registrations, subscription renewals, or compliance deadlines). The TimeTraveler API in particular lets teams simulate "what does the system do on the 31st of next month?" deterministically, which de-risks shipping date-driven features.
  • Roadmap Alignment: Accelerates development of time-zone-aware and calendar-aware features (e.g., global user-facing apps, cross-border transactions, multi-region deployments, monthly billing/anniversary logic).
  • Build vs. Buy: Justifies outsourcing complex date logic (recurring intervals, DST adjustments, month-end reference-day arithmetic) to a maintained library instead of custom code. v2.15.1 reinforces this: the maintainers reverted a behavioural change within a patch release rather than leaving downstream consumers to absorb it — but the flip-flop also shows how subtle month arithmetic is, and why the logic shouldn't be hand-rolled.
  • Dependency Governance Decision: v2.15.1 is a behavioural revert shipped as a patch (addMonthWithReference() returns to v2.14.1 semantics). This makes "pin exact versions and read patch changelogs" a deliberate product/engineering policy, not an afterthought.
  • Use Cases:
    • User-Facing: Calendar integrations, booking systems, or notifications with localized time displays.
    • Billing/Subscription: Monthly anniversary and "same day next month" calculations where reference-day semantics matter.
    • Internal Tools: Automated workflows (e.g., "run this report every 3rd Tuesday at 9 AM UTC").
    • QA/Test Harness: Freezing or advancing time in tests so date-dependent features can be verified without clock mocking hacks.

When to Consider This Package

  • Adopt if:
    • Your app requires reliable date arithmetic (e.g., adding 30 days to a timestamp, handling edge cases like month-end dates).
    • You need reference-day month arithmetic (e.g., "one month after Jan 31, realigned on the reference day of the month actually reached") — the exact behaviour v2.15.1 restores.
    • You want deterministic time control in tests via TimeTraveler for date-driven features (renewals, trials, expiry).
    • You need time-zone-aware operations (e.g., converting user input to UTC or vice versa).
    • Your team lacks expertise in PHP's DateTime intricacies (recurring events, custom periods, DST transitions).
    • You're building a scalable system where date logic is critical (financial systems, healthcare apps, subscription platforms).
  • Look elsewhere if:
    • You're using JavaScript/TypeScript (consider date-fns or luxon for frontend-backend consistency).
    • Your needs are simple (basic formatting; PHP's native DateTime suffices).
    • You require strict semantic-versioning guarantees: the v2.15.0 → v2.15.1 sequence changed observable behaviour of a public method and then reverted it, both in patch releases. If your release process can't tolerate that, constrain with an exact version pin or a caret range floor of 2.15.1.
    • The package lacks active maintenance — check GitHub activity and the issue tracker rather than assuming; recent releases are a positive signal, but verify cadence.
    • You're constrained by license incompatibility (MIT is broadly compatible; confirm against your open-source policy).

Action for teams already on 2.15.0: treat v2.15.1 as a required upgrade if any code depends on addMonthWithReference() results (billing dates, proration, renewal scheduling). Re-run characterization tests on month-end and leap-adjacent cases (Jan 31 → Feb, Feb 29 → Mar) before deploying. Teams on 2.14.1 or earlier: no behavioural change expected, upgrade is low risk.


How to Pitch It (Stakeholders)

For Executives: "This package lets us ship time-sensitive features faster — global scheduling, automated reminders, subscription renewals — without hiring specialised backend talent. It handles the hard parts (time zones, 'every 2nd Friday', month-end dates) so we don't carry that risk in our own code. The latest release is a corrective one: the maintainers reverted a behaviour change from the previous version, which is a good sign of responsiveness but also a reminder that date logic is genuinely tricky — exactly why we buy rather than build. The MIT license and active maintenance make it a low-cost, low-risk dependency. My recommendation: adopt, pin the exact version in our lockfile, and require changelog review on every patch bump. That's a small process cost for a meaningful reduction in scheduling bugs."

For Engineering: "v2.15.1 reverts the v2.15.0 behaviour change to TimeTraveler::addMonthWithReference() (#46, reverted in #47). It's back to v2.14.1 arithmetic: one month after $from, realigned on the reference day of the month actually reached. Only the implementation was reverted — the test suite keeps its #[DataProvider] attributes, so the coverage that surfaced the issue stays in place.

Practical implications: (1) if you're on 2.15.0 and assert on month-reference results, your tests or stored dates may shift — upgrade and re-verify; (2) the method's contract is now effectively frozen at the 2.14.1 semantics, so code written against 2.14.x is safe again; (3) pin the dependency to an exact version and diff the changelog on patch releases, since behaviour has changed twice inside the patch line. TimeTraveler still integrates cleanly with Eloquent timestamp fields and gives deterministic control for date-driven feature tests. Good fit where date logic is a real pain point but not the product's core focus."

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.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc