{"id":34008576,"url":"https://github.com/laracraft-tech/carbon-extensions","last_synced_at":"2025-12-13T11:39:04.188Z","repository":{"id":149806282,"uuid":"621867121","full_name":"laracraft-tech/carbon-extensions","owner":"laracraft-tech","description":"Some useful extension for the carbon library!","archived":false,"fork":false,"pushed_at":"2025-11-25T09:17:04.000Z","size":45,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-28T15:54:15.944Z","etag":null,"topics":["carbon","date","fiscalyearutils","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laracraft-tech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-31T14:58:15.000Z","updated_at":"2025-11-25T09:17:01.000Z","dependencies_parsed_at":"2023-07-23T10:48:37.513Z","dependency_job_id":"d72a340a-4e1e-4d4f-9173-5357d0aa2db3","html_url":"https://github.com/laracraft-tech/carbon-extensions","commit_stats":{"total_commits":16,"total_committers":3,"mean_commits":5.333333333333333,"dds":0.5,"last_synced_commit":"adf6d406a5438901750a8f5d481bb1610f869f62"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":"laracraft-tech/package-skeleton-php","purl":"pkg:github/laracraft-tech/carbon-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Fcarbon-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Fcarbon-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Fcarbon-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Fcarbon-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laracraft-tech","download_url":"https://codeload.github.com/laracraft-tech/carbon-extensions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Fcarbon-extensions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27704986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carbon","date","fiscalyearutils","php"],"created_at":"2025-12-13T11:39:03.509Z","updated_at":"2025-12-13T11:39:04.183Z","avatar_url":"https://github.com/laracraft-tech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Carbon Extensions\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/laracraft-tech/carbon-extensions.svg?style=flat-square)](https://packagist.org/packages/laracraft-tech/carbon-extensions)\n[![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)\n[![Check \u0026 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)\n[![License](https://img.shields.io/packagist/l/laracraft-tech/carbon-extensions.svg?style=flat-square)](https://packagist.org/packages/laracraft-tech/carbon-extensions)\n\u003c!--[![Total Downloads](https://img.shields.io/packagist/dt/laracraft-tech/carbon-extensions.svg?style=flat-square)](https://packagist.org/packages/laracraft-tech/carbon-extensions)--\u003e\n\nHere we will share some useful carbon extensions, which we need in our daily work.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require laracraft-tech/carbon-extensions\n```\n\n## Usage\n\n### CarbonFiscalYear\n\n---\n\nThe `CarbonFiscalYear` class helps you to work with **fiscal years**!\nIt easily lets you know the fiscal years **start** and **end** of a given date.\n\n**Note:** There is also a `CarbonFiscalYearImmutable`, class which has the same API,\nbut it works _immutable_. For more information on _immutables_, check out the [carbon docs](https://carbon.nesbot.com/docs/).\n\n```php\n// set your fiscal year start month and day \nCarbonFiscalYear::setFiscalYearStart(4, 1);\n\n$date = CarbonFiscalYear::parse(\"2022-03-30\");\n$date-\u003estartOfYear()-\u003eformat(\"Y-m-d\"); // 2021-04-01\n$date-\u003eendOfYear()-\u003eformat(\"Y-m-d\"); // 2022-03-31\n\n$date2 = CarbonFiscalYear::parse(\"2022-04-02\");\n$date2-\u003estartOfYear()-\u003eformat(\"Y-m-d\"); // 2022-04-01\n$date2-\u003eendOfYear()-\u003eformat(\"Y-m-d\"); // 2023-03-31\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Zacharias Creutznacher](https://github.com/laracraft-tech)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaracraft-tech%2Fcarbon-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaracraft-tech%2Fcarbon-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaracraft-tech%2Fcarbon-extensions/lists"}