PHPackages                             lucky-media/business-hours - 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. lucky-media/business-hours

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

lucky-media/business-hours
==========================

v2.0(4y ago)328PHPPHP ^7.4 || ^8.0 || ^8.1

Since Feb 8Pushed 3y agoCompare

[ Source](https://github.com/lucky-media/business-hours)[ Packagist](https://packagist.org/packages/lucky-media/business-hours)[ RSS](/packages/lucky-media-business-hours/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Business Hours
==============

[](#business-hours)

Business Hours is a Statamic addon that gives you the option to easily create, manage and display business hours in a modern and stylish layout.

Features
--------

[](#features)

- Set opening and closing times for each day of the week separately.
- Fields to indicate if you are currently open or closed
- Conditionals to display a text only when you are open or closed
- Comes unstyled, bring your own styling
- Supports `special dates` e.g: holidays, company wide vacations etc
- Use different time zones and languages
- Beautiful &amp; user-friendly settings screen for you, or your client
- Localizable fields for easy translation in any language

How to Install
--------------

[](#how-to-install)

You can search for this addon in the `Tools > Addons` section of the Statamic control panel and click **install**, or run the following command from your project root:

```
composer require lucky-media/business-hours
```

How to Use
----------

[](#how-to-use)

On your frontend you can make use of the `business_hours` tag to iterate through the hours.

```
{{ business_hours }}

  {{ weekday }}

  {{ closed }}

  {{ 24_hours }}

  {{ start_time }}

  {{ end_time }}

  {{ is_open }}

{{ /business_hours }}
```

Params:

- `weekday` (string)
    - Weekday label
- `closed` (boolean)
    - Is the business closed on this day
- `24_hours` (boolean)
    - Is the business working 24hrs on this day
- `start_time` (string)
    - What time does the business start on this day
- `end_time` (string)
    - What time does the business end on this day
- `is_open` (boolean)
    - Is the business open at this moment

If you need to display the exeptions you can use the following:

```
{{ business_hours:exception }}

 {{ reason }}

 {{ start_date }}

 {{ end_date }}

{{ /business_hours:exception }}
```

Params:

- `reason` (bard)
    - Bard field to write down the reason for the exception
- `start_date` (date)
    - Start date of the exception
- `end_date` (date)
    - End date of the exception

Common Gotcha's
---------------

[](#common-gotchas)

- Make sure on your `config/app.php` you have the correct timezone.
- You can either display times on 24 hour format or 12 hour format, you can change this on `config/statamic/business_hours.php`
- Make sure on CP the `start_time` and `end_time` are entered in 24 hour format. There is also validation if the time is not in this format.

Examples
--------

[](#examples)

Check the example below and the code snippet. Please keep in mind that the examples use Tailwind CSS for styling.

[![Screenshot 2022-02-08 at 13 21 11](https://user-images.githubusercontent.com/11158157/152985979-aec8c318-7774-419d-b591-c44a66ab544a.png)](https://user-images.githubusercontent.com/11158157/152985979-aec8c318-7774-419d-b591-c44a66ab544a.png)

```

    {{ business_hours:exception }}

            {{ reason }}

    {{ /business_hours:exception }}

        {{ business_hours }}

                {{ weekday }}

                {{ if closed }}
                    closed
                {{ /if }}

                {{ if !closed and !24_hours }}

                        {{ start_time }} - {{ end_time }}

                {{ /if }}

                {{ if 24_hours }}

                        24hrs

                {{ /if }}

                {{ if is_open }}

                        open now

                {{ /if }}

        {{ /business_hours }}

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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 ~37 days

Total

2

Last Release

1517d ago

Major Versions

v1.0 → v2.02022-03-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/778e85e43a7709eeccd92f0cbfb68f4b07e3e7fe37547f341578a8beae143e6a?d=identicon)[lokmanmusliu](/maintainers/lokmanmusliu)

---

Top Contributors

[![lokmanm](https://avatars.githubusercontent.com/u/11158157?v=4)](https://github.com/lokmanm "lokmanm (6 commits)")

### Embed Badge

![Health badge](/badges/lucky-media-business-hours/health.svg)

```
[![Health](https://phpackages.com/badges/lucky-media-business-hours/health.svg)](https://phpackages.com/packages/lucky-media-business-hours)
```

###  Alternatives

[statamic/ssg

Generate static sites with Statamic.

254302.4k](/packages/statamic-ssg)[statamic/seo-pro

65440.7k](/packages/statamic-seo-pro)[jacksleight/statamic-bard-texstyle

17172.5k](/packages/jacksleight-statamic-bard-texstyle)[visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor.

20116.8k](/packages/visuellverstehen-statamic-classify)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

2381.5k10](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)

PHPackages © 2026

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