-
Notifications
You must be signed in to change notification settings - Fork 23
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 times to the schedule #283
Conversation
For each period, display the start and end time in the schedule.
It would be great if someone who doesn't have an AM class could test this out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well for me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work for me. I am working on a fix.
Finding the time for a period is independent of the periods in a student's schedule because the start and end times are in schedule.json; also, remove usage of the comma operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just now refactored the code so that it is more efficient and clean and also works on my schedule, so it looks good to me apart from some stylistic comments: (a) we should display "AM"/"PM" instead of just leaving it implied (we can add a 24-hour time option once #23 is implemented), and (b) an en dash (–
) should be used between times, not a hyphen (see Butterick's Practical Typography).
By the way, the time formatting can be handled by |
@psvenk Great - that seems a lot easier. I can take care of these fixes if you'd like. |
This not only resolves ambiguity arising from 12-hour time without "AM" or "PM" but also localizes the time format (so that, e.g., 24-hour time will be used when the locale specifies it).
There was a problem hiding this 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!
Looks good to me as well. |
For each period, display the start and end time in the schedule.