Skip to content

feat: implement flexible date input for getEvents() method#186

Merged
muness merged 1 commit into
masterfrom
feature-flexible-date-input
Aug 29, 2025
Merged

feat: implement flexible date input for getEvents() method#186
muness merged 1 commit into
masterfrom
feature-flexible-date-input

Conversation

@muness

@muness muness commented Aug 29, 2025

Copy link
Copy Markdown
Member

Related to #181 where a user was using moment objects in their template. I think that should work for a more friendly API.

  • Add DateNormalizer class to handle string, moment, and Date object inputs
  • Fix issue where moment objects passed to getEvents() weren't being processed
  • Extract date normalization logic from icalUtils.ts for better separation of concerns
  • Add test for DateNormalizer
  • Maintain backward compatibility while enabling mixed date input types
  • Resolve recurring events not appearing when using the getEvents API with moment or Date objects.

- Add DateNormalizer class to handle string, moment, and Date object inputs
- Fix issue where moment objects passed to getEvents() weren't being processed
- Extract date normalization logic from icalUtils.ts for better separation of concerns
- Add comprehensive test coverage for DateNormalizer (19 test cases)
- Maintain backward compatibility while enabling mixed date input types
- Resolve recurring events not appearing when using Templater with moment objects

Resolves issue where Meeting 2 style recurring events weren't showing up
when Templater code passed moment objects instead of formatted strings.
@muness muness self-assigned this Aug 29, 2025
@muness muness added the enhancement New feature or request label Aug 29, 2025
@muness muness merged commit 060ba11 into master Aug 29, 2025
@muness muness deleted the feature-flexible-date-input branch August 29, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant