chore(conductor): Add new track 'Fix RRULE UNTIL conversion'

This commit is contained in:
2026-02-20 13:33:27 -08:00
parent 523b49dd3a
commit cd0fdf5f98
5 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# Specification: Fix RRULE UNTIL Object Conversion
## Overview
The conversion of RRULE objects to strings fails for nested objects like `UNTIL` dates, resulting in `UNTIL=[object Object]`. This causes the `rrule` library to fail during expansion.
## Functional Requirements
- **Robust Value Formatting:** Implement `formatRRuleValue` to handle various types of RRULE values:
- **Date Objects:** Convert to `YYYYMMDDTHHMMSSZ`.
- **Nested Date Objects:** (e.g., `{ date: Date }` from `ts-ics`) Extract and convert.
- **Other Types:** Default to string conversion.
- **Mapping Preservation:** Maintain the existing `RRULE_KEY_MAP` for key translation.
## Implementation Steps
1. **Reproduce:** Add test `expandRecurrences - object rrule with until` in `icalendar_test.ts` using a Date object for `until`. Verify it fails with `Invalid UNTIL value`.
2. **Fix:** Update `expandRecurrences` in `icalendar.ts` to use a formatting helper for values.
3. **Verify:** Confirm the test case passes.
## Acceptance Criteria
- [ ] Test `expandRecurrences - object rrule with until` passes.
- [ ] The generated string correctly represents the date (e.g., `UNTIL=20260219T000000Z`).