npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@opkod-france/strapi-plugin-opening-hours

v1.0.2

Published

A Strapi custom field plugin for managing business opening hours with split shifts and special/holiday hours

Readme


Overview

This plugin adds an Opening Hours custom field to Strapi's Content-Type Builder. The field stores structured JSON following Schema.org OpeningHoursSpecification conventions, making it ready for SEO and structured data integration.

Features

  • Weekly schedule — per-day open/closed toggle with time pickers
  • Split shifts — multiple time slots per day (e.g. lunch + dinner)
  • Copy hours — replicate one day's schedule to weekdays or all days
  • Special/holiday hours — named overrides with date ranges
  • Preview tab — read-only formatted summary of the full schedule
  • Schema.org compatible — JSON output follows OpeningHoursSpecification
  • Strapi Design System — built entirely with native Strapi components

Quick Start

1. Install

yarn add @opkod-france/strapi-plugin-opening-hours

2. Enable the plugin

// config/plugins.ts
export default () => ({
  'opening-hours': {
    enabled: true,
  },
});

3. Rebuild and start

yarn build
yarn develop

4. Add the field

  1. Open the Content-Type Builder
  2. Add a new custom field and select Opening Hours
  3. Save the content type
  4. The field appears in the content editor with three tabs: Regular Hours, Special Hours, and Preview

JSON Structure

The field stores a single JSON object with two arrays:

{
  "regularHours": [
    {
      "dayOfWeek": "Monday",
      "isOpen": true,
      "timeSlots": [
        { "opens": "09:00", "closes": "12:00" },
        { "opens": "14:00", "closes": "18:00" }
      ]
    },
    {
      "dayOfWeek": "Sunday",
      "isOpen": false,
      "timeSlots": []
    }
  ],
  "specialHours": [
    {
      "label": "Christmas Day",
      "validFrom": "2025-12-25",
      "validThrough": "2025-12-25",
      "isOpen": false,
      "timeSlots": []
    }
  ]
}

Field Reference

| Field | Type | Description | |-------|------|-------------| | dayOfWeek | string | Schema.org day name (MondaySunday) | | isOpen | boolean | Whether the business is open | | timeSlots | array | Time ranges; empty when closed | | opens / closes | string | Time in HH:MM 24-hour format | | label | string | Name for a special hours entry | | validFrom / validThrough | string | ISO date (YYYY-MM-DD) |

Development

# Install dependencies
yarn install

# Build the plugin
yarn build

# Watch mode (rebuilds on changes)
yarn watch

# Run tests
yarn test

# Run tests in watch mode
yarn test:watch

Local Development

Link the plugin for local testing:

# In the plugin directory
yarn link

# In your Strapi project
yarn link @opkod-france/strapi-plugin-opening-hours

Then add an explicit resolve path in config/plugins.ts:

export default () => ({
  'opening-hours': {
    enabled: true,
    resolve: './node_modules/@opkod-france/strapi-plugin-opening-hours',
  },
});

Requirements

| Dependency | Version | |------------|---------| | Strapi | >= 5.0.0 | | Node.js | >= 18 | | React | 17.x or 18.x |

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

This project uses conventional commits and semantic-release for automated versioning.

License

MIT © Opkod France