Download the PHP package vesselind/working-days-calculator without Composer
On this page you can find all versions of the php package vesselind/working-days-calculator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download vesselind/working-days-calculator
More information about vesselind/working-days-calculator
Files in vesselind/working-days-calculator
Download vesselind/working-days-calculator
More information about vesselind/working-days-calculator
Files in vesselind/working-days-calculator
Vendor vesselind
Package working-days-calculator
Short Description PHP library for calculating Bulgarian working days and legal deadlines
License MIT
Package working-days-calculator
Short Description PHP library for calculating Bulgarian working days and legal deadlines
License MIT
Please rate this library. Is it a good library?
Informations about the package working-days-calculator
Bulgarian Working Days Calculator
A standalone, framework-agnostic PHP library for calculating Bulgarian working days, working hours, public holidays, and legal deadlines per the Bulgarian Labor Code (art. 154) and Civil Procedural Code (art. 60).
Installation
Via Packagist
Via local path repository
Quick Start (≤ 5 lines — SC-004)
Usage Examples
Working Days in a Month
Working Days in a Full Year
Working Days for a Custom Date Range
Working Hours
Listing Holidays for a Period
Injecting Government-Announced Days Off
Orthodox Easter Date
Legal Deadline Calculation (CPC Art. 60)
Handling Invalid Input
Legal Deadline Calculation (ЗЗД Art. 72 — Law of Obligations)
ЗЗД art. 72 rules applied:
- §1 Month terms clamp to last day of month when the target month is shorter.
- §1 Week terms expire on the same weekday N weeks later.
- §2 Day terms: the triggering event day is not counted.
- §2 Non-working last day → first following working day (присъствен ден).
- §3 Backward day terms: neither the target day nor the expiry day is counted.
- §5 Named anchors: начало = 1st, среда = 15th, край = last day of month.
Requirements
| Requirement | Value |
|---|---|
| PHP version | ^8.2 |
| Carbon | ^3.0 (nesbot/carbon) |
| Framework | None (zero runtime framework dependencies) |
| Installation | Composer |
| Namespace | Vesselind\WorkingDaysCalculator\ |
Features
- Bulgarian public holidays — Labor Code art. 154 (11 fixed holidays)
- Compensation days — art. 154 §2 weekend-shift rule
- Orthodox Easter — Meeus/Julian algorithm (2000–2100)
- Government-announced days — art. 154 §3 (constructor injection, no global state)
- Working hours — configurable hours-per-day multiplier
- Legal deadlines (CPC) — CPC art. 60 (Day/Week/Month/Year terms with automatic advancement)
- Legal deadlines (ЗЗД) — Law of Obligations art. 72: forward terms, backward day terms (§3, both endpoints excluded), named month anchors (§5 — beginning/middle/end of month)
- Immutable value objects — all results are
readonlyDTOs - Strict types —
declare(strict_types=1)in every file
License
MIT
All versions of working-days-calculator with dependencies
PHP Build Version
Package Version
The package vesselind/working-days-calculator contains the following files
Loading the files please wait ...