Repository navigation
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. |
psvenk
left a comment
There was a problem hiding this comment.
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.
psvenk
left a comment
There was a problem hiding this comment.
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).
|
Looks good to me as well. |
For each period, display the start and end time in the schedule.