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

ActiveLibrary

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)025MITPHPPHP ^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 59% of packages

Maintenance40

Moderate activity, may be stable

Popularity6

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

509d 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

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[illuminatech/balance

Provides support for Balance accounting system based on debit and credit principle

16137.4k](/packages/illuminatech-balance)

PHPackages © 2026

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