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

Fix bug with AM and PM classes #268

Merged
merged 2 commits into from
Feb 17, 2021
Merged

Fix bug with AM and PM classes #268

merged 2 commits into from
Feb 17, 2021

Conversation

jadebuckwalter
Copy link
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
Copy link
Member

@psvenk psvenk left a comment

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
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).
Copy link
Member

@psvenk psvenk left a comment

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
This pull request was closed.
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