PHPackages                             spyrmp/working-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. spyrmp/working-days

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

spyrmp/working-days
===================

v0.0.1(4y ago)044MITPHP

Since Jan 1Pushed 4y ago1 watchersCompare

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

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

working-days
============

[](#working-days)

Laravel plugin for working days.Get working days from the current week. Use custom validation for Date fields.

Install
-------

[](#install)

This project can be installed via Composer run the following command:

```
composer require spyrmp/working-days
```

Add the Service Provider &amp; Facade/Alias
-------------------------------------------

[](#add-the-service-provider--facadealias)

Once spyrmp/working-days is installed, you need to register the service provider in config/app.php. Make sure to add the following line above the RouteServiceProvider.

```
\Spyrmp\WorkingDays\WorkingDayServiceProvider::class,
```

You may add the following `aliases` to your `config/app.php`:

```
'WorkingDays' => Spyrmp\WorkingDays\Facades\WorkingDays::class,
```

Publish the package config file by running the following command:

```
php artisan vendor:publish --provider="Spyrmp\WorkingDays\WorkingDayServiceProvider" --tag="working-days"

```

Usage
-----

[](#usage)

Get working days of the current week

```
$carbon = Carbon::make('2022-01-03'); // First day of the week
$workingDays = \WorkingDays::getWorkingDays($carbon);
dd($workingDays); // Carbon[]|[]
```

Get non-working days of the current week

```
$carbon = Carbon::make('2022-01-03'); // First day of the week
$nonWorkingDays = \WorkingDays::getNonWorkingDays($carbon);
dd($nonWorkingDays); // Carbon[]|[]
```

\###Validation Rules

> is\_non\_working\_day

The field under validation must be a value of non-working days. The dates will be passed into the PHP Carbon function in order to be converted into a valid DateTime instance.

> is\_working\_day

The field under validation must be a value of working days. The dates will be passed into the PHP Carbon function in order to be converted into a valid DateTime instance.

```
$rule= [
       "date1"=>"is_non_working_day"
       "date2"="is_working_day"
];
$inputs = $request->all();
$validation = Validator::make($inputs, $rule);
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

1596d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/625d89fbdb862880e7d85b641c9e066f7db625dd094ecfdae252776a46f6698e?d=identicon)[spyrmp](/maintainers/spyrmp)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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