Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add complex recurring formatting #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nickpagz
Copy link
Collaborator

Changes proposed in this Pull Request

  • The current Sugar Calendar plugin and Advanced Recurring extension do not consider output formatting options for more complex recurring event patterns, such as every x weeks or months, etc. This commit is an attempt to add some of the required functionality to the theme.
  • This fix will always add an end-date to the output. It either uses the "Ending", "On" value if used, or it will calculate the end-date based on the number of occurrences.

This fix does not currently address:

  • Daily recurrences
  • Any logic to check if a set end date can fit in the number of intended occurrences (eg set to recur every 3rd week with an end date one week after start will be printed, even if it makes no sense).
  • Recurrences that never end. An output value is printed, but the source is currently unknown.

Testing instructions

  • Set up a recurring event that repeats with an "Every" value greater than one, and choose and Ending "after" some occurrences, use a value greater than 1.
  • Publish and view the single event. The event date output should specify a start date, interval, and end date. For example, a weekly event with a repeat every 3 weeks that ends after 3 occurrences should display Starts March 1, 2024 then every 3rd Friday until April 12, 2024

Mentions #55

The current Sugar Calendar plugin and Advanced Recurring extension do not consider output formatting options for more complex recurring event patterns, such as every x weeks or months, etc.
This commit is an attempt to add this functionality to the theme.
@nickpagz
Copy link
Collaborator Author

PS. This code is a first pass and has not been reviewed or tested on a staging site. Do not merge until further notice.

@ajolo2ky
Copy link
Contributor

ajolo2ky commented Mar 8, 2024

I see that checks have failed, could you please give it another go and push it to a stg environment for testing ? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants