PHPackages                             r-a-f/ecommerce-realization-days - 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. r-a-f/ecommerce-realization-days

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

r-a-f/ecommerce-realization-days
================================

Library for calculating and displaying order realization (e.g. shipping) dates in e-commerce systems.

v1.0.0(1y ago)11Apache-2.0PHPPHP &gt;=8.2 &lt;8.4

Since Apr 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/r-a-f/ecommerce-realization-days)[ Packagist](https://packagist.org/packages/r-a-f/ecommerce-realization-days)[ RSS](/packages/r-a-f-ecommerce-realization-days/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Ecommerce Realization Days
==========================

[](#ecommerce-realization-days)

[![Tests](https://camo.githubusercontent.com/75b440e6fa9d0acbcebae617e3e75f6359db48ccdcbdf4dafd428d5f6b081c1d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d3130302532352d627269676874677265656e)](#)[![Coverage](https://camo.githubusercontent.com/32855e94577df9d0a30995653b17d33a5fbfdf644518f96ea0374313397d19b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e)](#)[![MSI](https://camo.githubusercontent.com/f3c4aaf3c2d7399d8e8aeaca7e34cde1d5b274fa19758083b689f6a8e7531a43/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d53492d39362532352d627269676874677265656e)](#)[![PHP](https://camo.githubusercontent.com/0f3f56b418d776cec7ca8cf545a2bafa80b950687465e1655afd0ff32670b705/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e32253230253743253230382e332d626c7565)](#)[![PHPStan](https://camo.githubusercontent.com/59431f1f91f714c6ab28cb5ffc20bce95f53677404741b4a0434e09bed4dfbec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c25323031302d626c7565)](#)[![License](https://camo.githubusercontent.com/798509b4df525f56802b56f8096862487f08023e3d7561c68656f8dab10d0d6e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4170616368652d2d322e302d626c75652e737667)](LICENSE)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#)

Description
-----------

[](#description)

**Ecommerce Realization Days** is a PHP library for calculating and formatting order fulfillment (e.g. shipping) dates in e-commerce systems.

It supports:

- golden hour logic (cutoff time for same-day shipping)
- fixed days off (e.g. holidays)
- weekly days off (e.g. weekends)
- templates with html tags allowed

---

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

[](#installation)

Install via Composer:

```
composer require r-a-f/ecommerce-realization-days

```

✅ Example (basic)
-----------------

[](#-example-basic)

```
use RealizationDays\RealizationDays;

$config = new RealizationDays();
$config->setGoldenHour(14);
$config->setRealizationDays(3);
$config->setDateDaysOff(['2025-05-01', '2025-05-03']);
$config->setDateWeekOff([6, 7]); // Saturday and Sunday

$context = $config->calc();

echo $context->date->format('Y-m-d');
```

### 🎯 Formatting and display

[](#-formatting-and-display)

You can use `RealizationDaysFormatter` to generate customer-friendly messages like:

> "Order today – ships by Friday"
> "Order now – ships until 14:00 today"

### 🧪 Example:

[](#-example)

```
use RealizationDays\RealizationDaysFormatter;

// Format output
$formatter = new RealizationDaysFormatter($context);

// Set weekdays and templates
$formatter->setTranslation(
    ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
    [
        'BEFORE_TODAY' => 'Order today – ships before %DATE_OR_WEEKDAY%',
        'BEFORE_TOMORROW' => 'Order today – ships tomorrow!',
        'BEFORE_NEXT_DAYS' => 'Order today – ships by %DATE_OR_WEEKDAY%',
        'AFTER_TODAY' => 'Order now – ships until %GOLDEN_HOUR% today',
        'AFTER_TOMORROW' => 'Order now – ships the day after tomorrow',
        'AFTER_NEXT_DAYS' => 'Order now – ships by %DATE_OR_WEEKDAY%',
    ]
);

echo $formatter->format('d-m-Y'); // e.g. "Order today – ships by 20-04-2025"
```

👤 Author
--------

[](#-author)

Rafał Pawlukiewicz 🌍 pawlukiewicz.com

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance46

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

404d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/805a03c4a095bbed2506e4bd09e268d03dd21f310cd77b0485df6eb312154e78?d=identicon)[r-a-f](/maintainers/r-a-f)

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/r-a-f-ecommerce-realization-days/health.svg)

```
[![Health](https://phpackages.com/badges/r-a-f-ecommerce-realization-days/health.svg)](https://phpackages.com/packages/r-a-f-ecommerce-realization-days)
```

###  Alternatives

[divante-ltd/module-pimcore-integration

Magento-Pimcore bridge module.

348.3k](/packages/divante-ltd-module-pimcore-integration)

PHPackages © 2026

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