PHPackages                             gtmassey/days - 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. gtmassey/days

ActiveLibrary

gtmassey/days
=============

An extracted class that I wrote to help with managing days of the week as string objects. It does one thing and one thing only: convert a day of the week name to an abbreviation and back.

v1.0(2y ago)05MITPHPPHP ^8.1

Since Jan 29Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Days.php
========

[](#daysphp)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b99e4e133d0f9a44714c55f20c1b8783ad855d1041c30cd5045f7a46ec84247c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67746d61737365792f646179732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gtmassey/days)[![Tests](https://camo.githubusercontent.com/597126f94e2838e91df255f38e724530d04de69d4e00d93de0e6823cff7db904/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f67746d61737365792f446179732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/gtmassey/Days/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/5f2a45bbb55e453fb776dabc3e20a08066afd3babb74302d374ace088d9a2988/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67746d61737365792f646179732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gtmassey/days)

Simple helper class for accessing the days of the week as strings in PHP.

> Note from the developer:
>
> This package is literally only one class. I will likely never update this package again. I just wanted to make a simple helper class for switching between days as names and as abbreviations in a separate project. If you have any suggestions for features or ideas, feel free to fork!
>
> Thanks,
>
> Garrett

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

[](#installation)

You can install the package via composer:

```
composer require gtmassey/days
```

Usage
-----

[](#usage)

To use, you can either create a new days object with the `new` keyword, or you can use the `make` static method, or you can call the day of week directly as a static method:

```
use Gtmassey\Days\Days;

$monday = new Days('Monday');
$tuesday = Days::make('Tuesday');
$wednesday = Days::Wednesday();
```

Once you have a `Days` object, you can call the various methods to return the day of the week as a specific English formatted string:

```
$monday->asCharacterCode();      //'M'
$monday->asShortName();          //'Mon'
$sunday->asCharacterCode();      //'U'
$thursday->asFullName();         //'Thursday'
```

The character codes use `R` for Thursday to avoid confusion with Tuesday and `U` for Sunday to avoid confusion with Saturday.

Testing
-------

[](#testing)

To run the testsuite, run the following command:

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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

Unknown

Total

1

Last Release

837d ago

### Community

Maintainers

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

---

Top Contributors

[![gtmassey](https://avatars.githubusercontent.com/u/109831143?v=4)](https://github.com/gtmassey "gtmassey (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

string manipulationgtmasseyhelper classdays of week

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gtmassey-days/health.svg)

```
[![Health](https://phpackages.com/badges/gtmassey-days/health.svg)](https://phpackages.com/packages/gtmassey-days)
```

###  Alternatives

[opis/string

Multibyte strings as objects

7120.9M7](/packages/opis-string)[andreas-glaser/php-helpers

A comprehensive collection of PHP utility functions for array manipulation, string operations, date handling, HTML generation, form building, validation, and more. Modern PHP 8.2+ library with full type safety.

1386.5k2](/packages/andreas-glaser-php-helpers)

PHPackages © 2026

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