PHPackages                             andrewdyer/date-expression - 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. andrewdyer/date-expression

ActiveLibrary[Database &amp; ORM](/categories/database)

andrewdyer/date-expression
==========================

A utility that can be used to create raw query date expressions for MySQL or SQLite Laravel databases

1.0.2(1y ago)026MITPHPPHP ^7.3|^8.0

Since Sep 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/andrewdyer/date-expression)[ Packagist](https://packagist.org/packages/andrewdyer/date-expression)[ RSS](/packages/andrewdyer-date-expression/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

Date Expression
===============

[](#date-expression)

A utility that can be used to create raw query date expressions for MySQL or SQLite Laravel databases.

 [![Total Downloads](https://camo.githubusercontent.com/44f4b47c36df5ea5435e996db9cd8b1d2479d5c40522afa023ab4569f77e82a2/68747470733a2f2f706f7365722e707567782e6f72672f616e64726577647965722f646174652d65787072657373696f6e2f646f776e6c6f6164733f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/andrewdyer/date-expression) [![Latest Stable Version](https://camo.githubusercontent.com/2b0461feb98730dcfe5e0cf91bda3000695da17defb23114668cb6afc3d27a15/68747470733a2f2f706f7365722e707567782e6f72672f616e64726577647965722f646174652d65787072657373696f6e2f763f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/andrewdyer/date-expression) [![License](https://camo.githubusercontent.com/363bad85bd41b39ff77310be57035518f43a4cfa64f4977a80bd7385de8aa151/68747470733a2f2f706f7365722e707567782e6f72672f616e64726577647965722f646174652d65787072657373696f6e2f6c6963656e73653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/andrewdyer/date-expression)

License
-------

[](#license)

Licensed under MIT. Totally free for private or commercial projects.

Installation
------------

[](#installation)

```
composer require andrewdyer/date-expression

```

Usage
-----

[](#usage)

```
use Anddye\DateExpression\DateExpressionFactory;

$dateExpression = DateExpressionFactory::create($query, $column, $unit);

$value = $dateExpression->getValue();
```

### Function Arguments

[](#function-arguments)

NameTypeDescription$queryIlluminate\\Database\\Eloquent\\BuilderThe query builder being used to build the trend.$columnstringThe column being measured.$unitstringThe unit being measured. Supported values include; "daily", "monthly" or "weekly"Support
-------

[](#support)

If you're using this package, I'd love to hear your thoughts! Feel free to contact me on [Twitter](https://twitter.com/andyer92).

Found a bug? Please report it using the [issue tracker](https://github.com/andrewdyer/date-expression/issues), or better yet, fork the repository and submit a pull request.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~419 days

Total

3

Last Release

557d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/666597ea6e46748a89fe8764d1a45b4d0da97daf1bb1e9770ea34ae41f706d08?d=identicon)[andrewdyer](/maintainers/andrewdyer)

---

Top Contributors

[![andrewdyer](https://avatars.githubusercontent.com/u/8114523?v=4)](https://github.com/andrewdyer "andrewdyer (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andrewdyer-date-expression/health.svg)

```
[![Health](https://phpackages.com/badges/andrewdyer-date-expression/health.svg)](https://phpackages.com/packages/andrewdyer-date-expression)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M626](/packages/spatie-laravel-medialibrary)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M94](/packages/mongodb-laravel-mongodb)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[awobaz/compoships

Laravel relationships with support for composite/multiple keys

1.2k11.7M46](/packages/awobaz-compoships)[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.3M19](/packages/bavix-laravel-wallet)

PHPackages © 2026

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