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

strapi-rrule-field

v0.0.1

Published

Adds a custom field type to create recurring rules.

Readme

strapi-rrule-field

Strapi v5 plugin that adds a Recurrence Rule custom field. Stores an RRuleSet string in a string column and provides a composite form UI in the Content Manager for building recurring schedules with exclusions and extra dates.

Features

  • Frequency: Daily / Weekly / Monthly / Yearly
  • Interval (every N units)
  • Optional start date & time (DTSTART)
  • Optional duration per occurrence (DURATION)
  • End condition: never, on a date (UNTIL), or after N occurrences (COUNT)
  • Weekday selection (Weekly only)
  • Day-of-month selection (Monthly only)
  • Excluded dates (EXDATE) (for holidays, exceptions)
  • Extra one-off dates (RDATE)
  • Live RRule string preview

Installation

yarn add strapi-rrule-field

Register the plugin in your Strapi app's config/plugins.ts:

export default {
  'strapi-rrule-field': { enabled: true },
};

Usage

In the Content-Type Builder, add a Custom field and select Recurrence Rule. The field is stored as a plain string (e.g. RRULE:FREQ=WEEKLY;BYDAY=MO,FR).

The stored value is a standard iCalendar RRuleSet string. Multi-line when DTSTART, DURATION, EXDATEs, or RDATEs are present:

DTSTART:20260101T090000Z
RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;UNTIL=20261231T000000Z
DURATION:PT1H30M
EXDATE:20261225T000000Z
RDATE:20270101T000000Z

Multiple schedules per content type

A single RRule field describes one recurring schedule (one start time, one duration). For content types that need multiple schedules with different times (e.g. Monday at 9am for 1 hour, Wednesday at 2pm for 30 minutes), use a Strapi repeatable component containing this field.

Consuming the stored value

Use the rrule package to parse the stored string. Strip the DURATION line first if present, as the rrule library does not handle it:

import { rrulestr } from 'rrule';

const lines = value.split('\n');
const durationLine = lines.find(l => l.startsWith('DURATION:'));
const rruleStr = lines.filter(l => !l.startsWith('DURATION:')).join('\n');

const rruleset = rrulestr(rruleStr, { forceset: true });
const occurrences = rruleset.all();

Date handling / timezone note

The rrule library uses a "floating UTC" convention: all dates are stored with a UTC offset of zero but are intended to be interpreted as local calendar dates/times.

DTSTART carries the event start time (e.g. T090000Z = "9am, wherever you are"). EXDATE/RDATE are date-only and stored at UTC midnight.

When consuming occurrences, use UTC component accessors to avoid off-by-one errors in negative-offset timezones:

// safe in any timezone
const year  = date.getUTCFullYear();
const month = date.getUTCMonth();
const day   = date.getUTCDate();
const hours = date.getUTCHours();
const mins  = date.getUTCMinutes();

// can return the wrong day/time in e.g. UTC-5
const day = date.getDate();

This is only a concern on the consuming side. The plugin stores and hydrates dates correctly regardless of the editor's timezone.

Development

yarn build        # build the plugin
yarn watch        # watch mode
yarn watch:link   # watch + link for local Strapi app development