rrule-temporal 1.4.6 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,6 +37,30 @@ rule.all().forEach(dt => console.log(dt.toString()));
37
37
  const firstTen = rule.all((_, i) => i < 10);
38
38
  ```
39
39
 
40
+ ## Benchmarks
41
+
42
+ Uncached median ops/s from the benchmark suite on a MacBook Pro M2 Max.
43
+ The full three-library comparison, including `rrule-rust`, lives in `benchmarks/README.md`.
44
+
45
+ | Scenario | TZ | rrule-temporal median ops/s | rrule median ops/s | vs rrule |
46
+ | --- | --- | ---: | ---: | ---: |
47
+ | 30 daily occurrences | UTC | 29,275 | 16,762 | 1.75x |
48
+ | 30 daily occurrences | America/Chicago | 2,067 | 364 | 5.68x |
49
+ | Daily weekdays across many cycles | UTC | 1,894 | 766 | 2.47x |
50
+ | Daily weekdays across many cycles | America/Chicago | 64.9 | 18.9 | 3.43x |
51
+ | 720 hourly occurrences | UTC | 1,499 | 701 | 2.14x |
52
+ | 720 hourly occurrences | America/Chicago | 104 | 14.1 | 7.38x |
53
+ | 1,440 minutely occurrences | UTC | 751 | 325 | 2.31x |
54
+ | 1,440 minutely occurrences | America/Chicago | 145 | 7.1 | 20.42x |
55
+ | Weekly MO/WE/FR across many cycles | UTC | 1,179 | 1,053 | 1.12x |
56
+ | Weekly MO/WE/FR across many cycles | America/Chicago | 64.4 | 14.6 | 4.41x |
57
+ | Monthly last weekday across 20 years | UTC | 1,953 | 948 | 2.06x |
58
+ | Monthly last weekday across 20 years | America/Chicago | 45.5 | 39.4 | 1.15x |
59
+ | Monthly first and last weekday across 20 years | UTC | 1,378 | 1,202 | 1.15x |
60
+ | Monthly first and last weekday across 20 years | America/Chicago | 40.0 | 24.2 | 1.65x |
61
+
62
+ The current pattern is straightforward: `rrule-temporal` is faster than `rrule` across all of the scenarios above, with especially large gains on timezone-heavy daily, hourly, and minutely rules. The biggest recent jump came from the UTC monthly `BYDAY` + `BYSETPOS` path, which is now ahead as well.
63
+
40
64
  ## Separating DTSTART and RRULE
41
65
 
42
66
  Per RFC 5545, DTSTART and RRULE are separate properties. You can provide them separately:
@@ -118,6 +142,20 @@ below. These correspond to the recurrence rule parts defined in RFC&nbsp;5545:
118
142
  | `strict` | Enforce RFC 5545 constraints strictly (defaults to false). |
119
143
  | `dtstart` | First occurrence as `Temporal.ZonedDateTime`. |
120
144
 
145
+ ### Reusable Option Lists
146
+
147
+ The library also exports runtime option lists you can use to populate UI controls:
148
+
149
+ ```typescript
150
+ import { allowedFreq, allowedWeekdays } from "rrule-temporal";
151
+
152
+ // ["YEARLY", "MONTHLY", ...]
153
+ console.log(allowedFreq);
154
+
155
+ // ["MO", "TU", ...]
156
+ console.log(allowedWeekdays);
157
+ ```
158
+
121
159
  ## Querying occurrences
122
160
 
123
161
  Use the provided methods to enumerate or search for occurrences: