PHPackages                             laracraft-tech/carbon-extensions - 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. laracraft-tech/carbon-extensions

ActiveLibrary

laracraft-tech/carbon-extensions
================================

Some useful extension for the carbon library!

v0.2.1(3y ago)11478[1 PRs](https://github.com/laracraft-tech/carbon-extensions/pulls)MITPHPPHP ^7.4||^8.0CI passing

Since Apr 1Pushed 4mo ago1 watchersCompare

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

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

Carbon Extensions
=================

[](#carbon-extensions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b001d893cb02151bbe932914cf07da091b9ca8562f804ef06c78eb48f72eaba9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726163726166742d746563682f636172626f6e2d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laracraft-tech/carbon-extensions)[![Tests](https://github.com/laracraft-tech/carbon-extensions/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/laracraft-tech/carbon-extensions/actions/workflows/run-tests.yml)[![Check & fix styling](https://github.com/laracraft-tech/carbon-extensions/actions/workflows/fix-php-code-style-issues.yml/badge.svg?branch=main)](https://github.com/laracraft-tech/carbon-extensions/actions/workflows/fix-php-code-style-issues.yml)[![License](https://camo.githubusercontent.com/7466892ee7317aebf40d29206824e90d2172de1a093db98f1542c6b71e957836/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c61726163726166742d746563682f636172626f6e2d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laracraft-tech/carbon-extensions)

Here we will share some useful carbon extensions, which we need in our daily work.

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

[](#installation)

You can install the package via composer:

```
composer require laracraft-tech/carbon-extensions
```

Usage
-----

[](#usage)

### CarbonFiscalYear

[](#carbonfiscalyear)

---

The `CarbonFiscalYear` class helps you to work with **fiscal years**! It easily lets you know the fiscal years **start** and **end** of a given date.

**Note:** There is also a `CarbonFiscalYearImmutable`, class which has the same API, but it works *immutable*. For more information on *immutables*, check out the [carbon docs](https://carbon.nesbot.com/docs/).

```
// set your fiscal year start month and day
CarbonFiscalYear::setFiscalYearStart(4, 1);

$date = CarbonFiscalYear::parse("2022-03-30");
$date->startOfYear()->format("Y-m-d"); // 2021-04-01
$date->endOfYear()->format("Y-m-d"); // 2022-03-31

$date2 = CarbonFiscalYear::parse("2022-04-02");
$date2->startOfYear()->format("Y-m-d"); // 2022-04-01
$date2->endOfYear()->format("Y-m-d"); // 2023-03-31
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Zacharias Creutznacher](https://github.com/laracraft-tech)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance52

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~2 days

Total

3

Last Release

1129d ago

### Community

Maintainers

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

---

Top Contributors

[![Sairahcaz](https://avatars.githubusercontent.com/u/7384870?v=4)](https://github.com/Sairahcaz "Sairahcaz (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")

---

Tags

carbondatefiscalyearutilsphplaracraft-techcarbon-extensions

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/laracraft-tech-carbon-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/laracraft-tech-carbon-extensions/health.svg)](https://phpackages.com/packages/laracraft-tech-carbon-extensions)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M344](/packages/tymon-jwt-auth)[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[spatie/laravel-sitemap

Create and generate sitemaps with ease

2.6k14.6M107](/packages/spatie-laravel-sitemap)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[laracraft-tech/laravel-date-scopes

Some useful date scopes for your Laravel Eloquent models!

515215.0k2](/packages/laracraft-tech-laravel-date-scopes)

PHPackages © 2026

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