PHPackages                             healthengine/laravel-chronos - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. healthengine/laravel-chronos

Abandoned → [laravel/framework](/?search=laravel%2Fframework)ArchivedLibrary[Database &amp; ORM](/categories/database)

healthengine/laravel-chronos
============================

Swap out Carbon for Chronos

v4.0.1(1y ago)3218.3k11MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0

Since Dec 19Pushed 1y ago2 watchersCompare

[ Source](https://github.com/HealthEngineAU/laravel-chronos)[ Packagist](https://packagist.org/packages/healthengine/laravel-chronos)[ RSS](/packages/healthengine-laravel-chronos/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (7)Used By (1)

Warning

This repository is archived. Use immutable date casts in [laravel/framework](https://github.com/laravel/framework) instead.

Laravel Chronos
===============

[](#laravel-chronos)

[![Latest Stable Version](https://camo.githubusercontent.com/1ab78aa81665f976d940c533c1d3401fea72cfdec605fa18a0c744a8db145753/68747470733a2f2f706f7365722e707567782e6f72672f6865616c7468656e67696e652f6c61726176656c2d6368726f6e6f732f76657273696f6e)](https://packagist.org/packages/healthengine/laravel-chronos)[![Total Downloads](https://camo.githubusercontent.com/3954e0eda560ea75a42a99f51d6abaa2d49dea47c46db67fef0089ef57b40685/68747470733a2f2f706f7365722e707567782e6f72672f6865616c7468656e67696e652f6c61726176656c2d6368726f6e6f732f646f776e6c6f616473)](https://packagist.org/packages/healthengine/laravel-chronos)[![CircleCI](https://camo.githubusercontent.com/c328f8eeafa1723dd76bea27a92a1c290854d504455df21c6465c508272e9e60/68747470733a2f2f646c2e636972636c6563692e636f6d2f7374617475732d62616467652f696d672f67682f4865616c7468456e67696e6541552f6c61726176656c2d6368726f6e6f732f747265652f6d61737465722e7376673f7374796c653d737667)](https://dl.circleci.com/status-badge/redirect/gh/HealthEngineAU/laravel-chronos/tree/master)

This is a custom package designed for Laravel Eloquent. It provides a trait that can be used in model classes that will cast datetime fields to ChronosInterface instead of Carbon instances.

Chronos is a drop-in replacement for Carbon but is immutable by default. It also provides an interface that can be used for some genericising as well.

See the [Chronos documentation](https://book.cakephp.org/3.0/en/chronos.html) for more information.

Usage
-----

[](#usage)

Warning

This package is not compatible with Laravel's attribute casts: immutable\_date, immutable\_datetime.

To convert datetime casts from Carbon instances to Chronos instances in an Eloquent model, all you need to do is `use`this trait in the model. An example is shown below:

```
use HealthEngine\LaravelChronos\ChronosTimestamps;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use ChronosTimestamps;

    protected $casts = [
        // Throws error: "Call to undefined method Cake\Chronos\Chronos::toImmutable()"
        // 'processed_at' => 'immutable_date',
        // Throws error: "Call to undefined method Cake\Chronos\Chronos::toImmutable()"
        // 'processed_at' => 'immutable_datetime',
        'processed_at' => 'datetime',
    ];
}
```

License
-------

[](#license)

Laravel Chronos is licensed under the MIT license.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 61.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~504 days

Total

5

Last Release

684d ago

Major Versions

1.0.0 → 2.0.02018-12-20

2.0.0 → v3.0.02022-11-18

v3.0.0 → v4.0.02023-09-13

PHP version history (3 changes)v3.0.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0

v4.0.0PHP ~8.1.0 || ~8.2.0

v4.0.1PHP ~8.1.0 || ~8.2.0 || ~8.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d6d54047748ac45bafb3af78039af88ec3569c5a5aa396737a32b8957ad66893?d=identicon)[tspencer244](/maintainers/tspencer244)

![](https://www.gravatar.com/avatar/0caec84933c461475313072790637b89e905b604ce657718e41116fbd7640368?d=identicon)[jradtilbrook](/maintainers/jradtilbrook)

---

Top Contributors

[![tspencer244](https://avatars.githubusercontent.com/u/15922667?v=4)](https://github.com/tspencer244 "tspencer244 (8 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (5 commits)")

---

Tags

carbonchronoseloquentimmutablelaravellaraveleloquentcarbonimmutablechronos

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/healthengine-laravel-chronos/health.svg)

```
[![Health](https://phpackages.com/badges/healthengine-laravel-chronos/health.svg)](https://phpackages.com/packages/healthengine-laravel-chronos)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[bavix/laravel-clickhouse

Eloquent model for ClickHouse

72214.1k2](/packages/bavix-laravel-clickhouse)[stayallive/laravel-eloquent-observable

Register Eloquent model event listeners just-in-time directly from the model.

2928.9k7](/packages/stayallive-laravel-eloquent-observable)[mozex/laravel-scout-bulk-actions

A Laravel Scout extension for bulk importing and flushing of all models.

1033.4k](/packages/mozex-laravel-scout-bulk-actions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
