Let's imagine we have the following code:

import { RRule, RRuleSet } from 'rrule'
import { ReadableRRuleSetBuilder } from 'rrule-by-pattern'

const rruleSet = new RRuleSet()

rruleSet.rrule(new RRule({
    freq: RRule.DAILY,
    dtstart: new Date(Date.UTC(2026, 0, 1, 6)),
    until: new Date(Date.UTC(2026, 0, 30, 6)),
}))
[]
const builder = new ReadableRRuleSetBuilder(
    rruleSet,
    pattern,
    rruleSet.count()
)

const newRRuleSet = builder.build()

console.log(newRRuleSet.all())

Console: