{"id":28676470,"url":"https://github.com/code16/carbon-business-days","last_synced_at":"2026-04-02T16:00:12.648Z","repository":{"id":56954784,"uuid":"133923937","full_name":"code16/carbon-business-days","owner":"code16","description":"A simple class for business days counting","archived":false,"fork":false,"pushed_at":"2024-04-03T09:57:44.000Z","size":12,"stargazers_count":54,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-18T21:45:56.797Z","etag":null,"topics":["carbon","php-library"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-18T08:09:24.000Z","updated_at":"2025-01-15T03:42:29.000Z","dependencies_parsed_at":"2022-08-21T04:10:56.673Z","dependency_job_id":null,"html_url":"https://github.com/code16/carbon-business-days","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/code16/carbon-business-days","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcarbon-business-days","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcarbon-business-days/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcarbon-business-days/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcarbon-business-days/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code16","download_url":"https://codeload.github.com/code16/carbon-business-days/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fcarbon-business-days/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31309572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","php-library"],"created_at":"2025-06-13T23:04:46.927Z","updated_at":"2026-04-02T16:00:12.630Z","avatar_url":"https://github.com/code16.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A simple business days calculator\n\nThis package aims to count business working days between two [Carbon](https://github.com/briannesbitt/Carbon) dates.\n\n## Usage\n\n```php\n$date = new BusinessDays();\n    \n// Set holidays (2018-1-1 is a Monday)\n$date-\u003eaddHoliday(Carbon::createFromDate(2018, 1, 1));\n    \n// Should return 9\n$days = $date-\u003edaysBetween(\n    Carbon::createFromDate(2018, 1, 1),\n    Carbon::createFromDate(2018, 1, 15)\n);\n    \n// Set a closed period (whole 2nd week)\n$date-\u003eaddClosedPeriod(\n    Carbon::createFromDate(2018, 1, 8),\n    Carbon::createFromDate(2018, 1, 12)\n);\n\n// Should return 5\n$days = $date-\u003edaysBetween(\n    Carbon::createFromDate(2018, 1, 1),\n    Carbon::createFromDate(2018, 1, 15)\n);\n```\nDefault for weekend days are saturdays and sundays, but it can be configured:\n\n```php\n$date-\u003esetWeekendDays([Carbon::SUNDAY, Carbon::MONDAY]);\n```\n    \nYou can also add or subtract days from a given date:\n\n```php\n$newDate = $date-\u003eaddDaysTo(\n    Carbon::createFromDate(2018, 5, 14), \n    10\n);\n$newDate = $date-\u003esubDaysFrom(\n    Carbon::createFromDate(2018, 5, 14), \n    10\n);\n```\n\n## Installation\n\n```\ncomposer require code16/carbon-business-days\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode16%2Fcarbon-business-days","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode16%2Fcarbon-business-days","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode16%2Fcarbon-business-days/lists"}