Skip to content

Fix bug with AM and PM classes - #268

Merged
jadebuckwalter merged 2 commits into
masterfrom
fix-am-pm-repeat
Feb 17, 2021
Merged

jadebuckwalter merged 2 commits into
masterfrom
fix-am-pm-repeat

Conversation

@jadebuckwalter

Copy link
Copy Markdown
Collaborator

Detect difference between AM and PM period names so they show up in the
correct places

@jadebuckwalter jadebuckwalter linked an issue Feb 14, 2021 that may be closed by this pull request

@psvenk psvenk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jadebuckwalter for the changes. Instead of hard-coding "l" for AM/PM classes, I think it would be a better idea to detect regular periods (01, 02, 03, 04) and fall back to a strict equality check, similar to how it worked before 9d2d9a8. Maybe we could do a regex search on period for /0\d/ to detect a regular period, and if so, see if the same period number is a substring of the default name. Your thoughts?

@psvenk psvenk added this to the 2.7.0 milestone Feb 15, 2021
@jadebuckwalter

Copy link
Copy Markdown
Collaborator Author

@psvenk Sure, that makes sense.

Detect difference between AM and PM period names so they show up in the
correct places
Instead of relying solely on the last character of the period name,
include explicit support for multiple period name formats so as to
reduce the rate of false positives (e.g., "Before School" and "After
School" being detected as the same period).

@psvenk psvenk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now. @jadebuckwalter, feel free to squash and merge (maybe using something like my commit message) once you have verified that this works for you.

@jadebuckwalter
jadebuckwalter merged commit 62d775c into master Feb 17, 2021
@jadebuckwalter
jadebuckwalter deleted the fix-am-pm-repeat branch February 17, 2021 02:25
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.

AM and PM classes show up multiple times

2 participants