Skip to content

Conversation

@AureliaSindhu
Copy link
Contributor

Summary

Fixed the calendar week layout so Saturday appears after Friday instead of before Sunday. Changed the week start day from Saturday (dow: 6) to Sunday (dow: 0).
Before: Sa | Su | M | Tu | W | Th | F
After: Su | M | Tu | W | Th | F | Sa

Test Plan

  • Add courses that meet Monday-Friday - verify they appear in the correct columns
  • Add a course that meets on Saturday - verify it appears in the rightmost column (after Friday)
  • Add a course that meets on Sunday - verify it appears in the leftmost column
  • Verify the calendar displays days in order: Su, M, Tu, W, Th, F, Sa

Issues

Saturday was displayed for the intial week.

Closes #1358

Copy link
Member

@KevinWu098 KevinWu098 left a comment

Choose a reason for hiding this comment

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

This looks like it does work for regular weeks, but on finals weeks, the week begins on Saturday. You can see this on the schedule, Fall 2025 exams are Dec 6–12 (Dec 6 is a Saturday).

In updating the start of the week, we have regressed in this area. Although it's outside the scope of the original issue, we should A. fix this and B. cannot proceed with this PR as it breaks finals functionality (which is more critical than the occasional Saturday class)

Your branch:
Image

Production:

Image

We may be able to dynamically update the start of the week based on if we're in finals viewing mode.

@alexespejo
Copy link
Collaborator

/deploy

@AureliaSindhu
Copy link
Contributor Author

sorry i forgot to push my changes

but I created a separate locale (en-us-finals) that starts the week on Saturday, stored separately from the regular en-us locale. So it now should detects when finals start on Saturday and dynamically switches to this Saturday-start locale only during finals viewing mode.

@KevinWu098
Copy link
Member

/deploy

Copy link
Member

@KevinWu098 KevinWu098 left a comment

Choose a reason for hiding this comment

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

Really great work! Some minor questions regarding logic/fixed.

Additionally, I'd suggest that, when writing a PR, you include screenshots of the new behavior working (or a short video). Also, for your test plan, including courses which trigger certain cases (e.g. saturday classes, saturday final) etc would be helpful for your reviewer!

Some examples of what I used:

  1. Drama 198 (Fall 2025) — Saturday and Sunday classes
  2. Math 2B (Fall 2025) — Saturday finals

@KevinWu098
Copy link
Member

Is this ready for review?

Copy link
Member

@KevinWu098 KevinWu098 left a comment

Choose a reason for hiding this comment

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

A few nits. Also, make sure to update your PR description with a demo of changes (before/after), as well as update your test plan with example courses

return momentLocalizer(moment);
}, [culture]);

const calendarView = showFinalsSchedule
Copy link
Member

Choose a reason for hiding this comment

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

issue: this seems overly complex. can we simplify the ternary?

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.

Saturday is not correctly displayed on the Calendar

4 participants