fresh/datetime
Fresh DateTime adds convenient, expressive date and time handling to Laravel and PHP applications. It simplifies parsing, formatting, comparing, and manipulating dates, with timezone-aware helpers and a clean, chainable API for everyday scheduling and timestamp tasks.
Architecture fit
Illuminate\Support\Carbon (Carbon) in every installation, and Carbon already covers the majority of what "additional date/time functions" typically means: isWeekend(), isWeekday(), isPast(), isFuture(), startOfWeek(), endOfWeek(), isSameDay(), diff helpers. The package's incremental value is therefore narrow and must be proven function-by-function, not assumed.now(), model timestamps), a parallel helper API creates a "which one do I use?" ambiguity that reviewers must police.Integration feasibility
composer require fresh/datetime plus autoloading; no configuration, no publishable assets, no migrations. Realistic effort is under one day for a spike, including reading the source.Technical risk
DateTimeImmutable has essentially no attack surface and no I/O.DateTime inputs. These produce wrong numbers in reports and invoices rather than exceptions.Key questions to resolve before approving
DateTimeInterface? Any internal Carbon dependency introduces a version-alignment constraint.composer.json require.php) versus our runtime — and does it support PHP 8.3/8.4 and Carbon 3?date_default_timezone_get()?Stack fit
Migration path (recommended: evaluate-then-vendor, not adopt)
composer why-not fresh/datetime against our constraints; then build the function list and diff it against Carbon's API. This is the decision gate.App\Support\DateTime helper (or a small packages/datetime internal package) with attribution under MIT. This eliminates the dependency entirely while retaining the value, and lets us fix DST/locale bugs on our own schedule.Compatibility
Sequencing
Fresh\DateTime\* usage outside the adapter.Maintenance
Support
Scaling
Failure modes
Ramp-up
Verdict Technically clean, strategically marginal (opportunity 47.23 reads correctly). For a Laravel stack the correct posture is audit-and-vendor, not adopt: extract the small set of helpers that Carbon genuinely lacks into an internal utility, take the MIT-licensed logic with attribution, and avoid adding a single-maintainer dependency with zero downstream validation to a critical date-handling path.
How can I help you explore Laravel packages today?