PHPackages                             applicazza/appointed - 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. applicazza/appointed

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

applicazza/appointed
====================

Check whether required appointment slot is open or offer closest available one

0.6.4(8y ago)110.8k3[1 PRs](https://github.com/applicazza/appointed/pulls)1MITPHPPHP &gt;=5.6.0

Since Jul 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/applicazza/appointed)[ Packagist](https://packagist.org/packages/applicazza/appointed)[ RSS](/packages/applicazza-appointed/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (15)Used By (1)

![GitHub tag](https://camo.githubusercontent.com/11fbd63837d902745aaaee68ad46b68bc545039f8670b5603d7f62824f9188a4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6170706c6963617a7a612f6170706f696e7465642e737667) ![license](https://camo.githubusercontent.com/3b3209818e93eed67ecee77bc19846f9e7b0416fa7135346e4db07c7bd39cfea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6170706c6963617a7a612f6170706f696e7465642e737667) ![Packagist](https://camo.githubusercontent.com/dd23865311427cf06ff45cf95a30fd663542cf7fdab464b87b71634764bd6c7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6170706c6963617a7a612f6170706f696e7465642e737667)

Installation
============

[](#installation)

```
composer require applicazza/appointed

```

Usage
=====

[](#usage)

- Set up default timezone, i.e.

```
date_default_timezone_set('Asia/Jerusalem');
```

- Instantiate business day

```
use Applicazza\Appointed\BusinessDay;

// ...
$business_day = new BusinessDay;
```

- Create some operating periods and add them to business day. If some operating periods cannot be added then false will be returned and no changes will be applied whatsoever

```
use Applicazza\Appointed\Period;

// ...

$period_0900_1400 = Period::make(today( 9, 00), today(14, 00));
$period_1600_1900 = Period::make(today(16, 00), today(19, 00));

$business_day->addOperatingPeriods(
    $period_1600_1900,
    $period_0900_1400
);
```

- Create some appointments and add them to business day. If some appointments cannot be added then false will be returned and no changes will be applied whatsoever

```
use Applicazza\Appointed\Appointment;

// ...

$appointment_1100_1130 = Appointment::make(today( 11, 00), today(11, 30));
$appointment_1200_1330 = Appointment::make(today( 12, 00), today(13, 30));

$business_day->addAppointments(
    $appointment_1100_1130,
    $appointment_1200_1330
);
```

- To fit previously failed appointment use `BusinessDay::fit(Appointment $appointment, $direction = 'forward')` that will return either null or recommended Appointment

```
$business_day->fit($appointment_1300_1330, 'backward');
$business_day->fit($appointment_1300_1330);
```

- To delete appointment(s) use `BusinessDay::deleteAppointments(Appointment ...$appointment)` that will return boolean

```
$business_day->deleteAppointments($appointment_1300_1330);
```

- To delete operating period use `BusinessDay::deleteOperatingPeriod(Period $period)` that will return boolean

```
$business_day->deleteOperatingPeriod($period_0900_1400)
```

- To edit operating period use `BusinessDay::editOperatingPeriod(Period $old_period, Period $new_period)` that will return boolean

```
$business_day->editOperatingPeriod($period_1330_1400, $period_1330_1430)
```

- To get whole day agenda use `BusinessDay::getAgenda()` that will return array of Period and/or Appointment ordered ascending. Since underlying classes implement JsonSerializable interface this data may be easily encoded to json.

```
$agenda = $business_day->getAgenda();
// To pretty print results
echo json_encode($business_day->getAgenda(), JSON_PRETTY_PRINT), PHP_EOL;
```

Helpers
-------

[](#helpers)

```
use function Applicazza\Appointed\interval;
use function Applicazza\Appointed\today;
// ...
interval($hours = 0, $minutes = 0, $seconds = 0);
today($hours = 0, $minutes = 0, $seconds = 0);
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

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

Every ~0 days

Total

13

Last Release

3234d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/applicazza-appointed/health.svg)

```
[![Health](https://phpackages.com/badges/applicazza-appointed/health.svg)](https://phpackages.com/packages/applicazza-appointed)
```

###  Alternatives

[ashallendesign/short-url

A Laravel package for creating shortened URLs for your web apps.

1.4k1.9M4](/packages/ashallendesign-short-url)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[intervention/zodiac

Zodiac Sign Calculator

58191.7k](/packages/intervention-zodiac)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[solspace/craft-calendar

The most powerful event management and calendaring plugin!

1830.8k1](/packages/solspace-craft-calendar)

PHPackages © 2026

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