Introduction

Hi all, thanks for taking the time to read through this guide. Hopefully, this helps you manage Bay Clock. If you have any questions, please direct them to [email protected]. This guide doesn’t explain how to edit the functional code of the website (see Editing the Code), rather this guide explains how to edit the commonly changing parts of Bay Clock such as the schedules and lunch menu. If you would like to contribute, please email me and I will add you as a contributor to the github repository.

Important Links

Github Repository: https://github.com/lukajaa/bay-clock-3

Internal Schedule (Old): https://docs.google.com/spreadsheets/d/1spLfhnEJEGuHmaaLSQuU_uhgAhk4FRS98Z0FNERVkpQ/edit?gid=1189331418#gid=1189331418

JSON Formatter: https://jsonformatter.org/

Bug Report / Feedback Form: https://forms.gle/khAXGXiUMoAoskKQA

General Workflow

Changes are made by making a “commit” to github. You can do this by cloning the repository and pushing commits (more complicated, but easier to make multiple changes at once), or by editing files directly on the github website. Refer to the Internal Schedule in the Important Links section to see the schedule for the year. I wouldn’t input things very far into the future right now because they are sometimes subject to change. Talk to [email protected] if you have any specific questions about the schedule. I like to input the special schedules / upcoming breaks / lunch menu during the weekend before to make sure it’s properly updated for the upcoming week. Reminder that the only things you need to input are the Menu, Special Schedules, Breaks (holidays, etc), and Immersive Start and End Dates. As far as I’m aware the general schedule is the same as year to year so you shouldn’t need to change the Regular Schedule, Activity Schedule, or Immersive Schedule. However, these can be changed if necessary.

Editing JSONs

When editing JSONs, feel free to use an IDE such as Visual Studio Code or Sublime Text to edit the JSON and then copy and paste it into Github.

Updating the Schedule

All of the schedules / breaks are stored in JSON format. If you’re not familiar with this format, use the JSON formatter in the Important Links section to make sure it won’t break the website. Dates should be written as YYYY/MM/DD. Additionally, the end date for breaks and immersives should be one day after they actually end. For example, if the first day of school is 2024/8/19, then Summer Break should end on 2024/8/19 (this is because it will end right when it turns midnight). Furthermore, don’t pad with 0s. For example, type 5 instead of 05 when entering hours and minutes. If you want some references, you can look back on the archived schedules from Bay Clock 2 in the Important Links section.

Editing the Default Schedule

<aside> ⚠️ You should only edit the default schedule when the base schedule is changed. For entering special schedules, see Editing Special Schedules. Make sure to keeping using the names A, B, C, D, E, F, Morning Meeting, Tutorial, and Activities + Sports/Drama so that people’s custom names for blocks are automatically used. If, for some reason, Bay adds a new block (kuje “G” block) then you can contact me and I will add it to the code.

</aside>

In order to update the schedule, you must edit the Regular Schedule item. The JSON file is formatted into a dictionary with the name of the day as the keys, and the schedule as the value. The schedule dictionary has the block name as the keys and the start and end minute and hours as the value.

Here is the current schedule for Monday as an example:

  "Monday": {
    "Morning Meeting": {
      "start": {"hour": 8, "minute": 30},
      "end": {"hour": 8, "minute": 55}
    },
    "A": {
      "start": {"hour": 9, "minute": 0},
      "end": {"hour": 10, "minute": 15}
    },
    "B": {
      "start": {"hour": 10, "minute": 20},
      "end": {"hour": 11, "minute": 35}
    },
    "Lunch": {
      "start": {"hour": 11, "minute": 35},
      "end": {"hour": 12, "minute": 30}
    },
    "C": {
      "start": {"hour": 12, "minute": 30},
      "end": {"hour": 13, "minute": 45}
    },
    "D": {
      "start": {"hour": 13, "minute": 50},
      "end": {"hour": 15, "minute": 5}
    },
    "Tutorial": {
      "start": {"hour": 15, "minute": 10},
      "end": {"hour": 15, "minute": 40}
    }
  }

Editing the Default Activity Schedule

For some coding reasons, the activity schedule is stored separately from the rest of the schedule. You can find and edit the default activity schedule by editing the Activity Schedule item.

{
  "Monday": { "start": "15:50", "end": "17:30" },
  "Tuesday": { "start": "15:50", "end": "17:30" },
  "Wednesday": { "start": "15:50", "end": "17:30" },
  "Thursday": { "start": "15:50", "end": "17:30" },
  "Friday": { "start": "15:50", "end": "17:30" },
  "Saturday": { "start": "15:50", "end": "17:30" },
  "Sunday": { "start": "15:50", "end": "17:30" }
}

Adding Special Schedules

In order to add a special schedule, you must edit the Special Schedules file. Special schedules are formatted the same as normal schedules, but the key to the schedule is a date instead of the name of the week. You can delete special schedules from previous years once they have passed too.

Here is an example special schedule entry:

  "2024/8/18": {
    "Morning Meeting": {
      "start": {"hour": 8, "minute": 30},
      "end": {"hour": 8, "minute": 55}
    },
    "A": {
      "start": {"hour": 9, "minute": 0},
      "end": {"hour": 10, "minute": 15}
    },
    "B": {
      "start": {"hour": 10, "minute": 20},
      "end": {"hour": 11, "minute": 35}
    },
    "Lunch": {
      "start": {"hour": 11, "minute": 35},
      "end": {"hour": 12, "minute": 30}
    },
    "Field Day": {
      "start": {"hour": 12, "minute": 30},
      "end": {"hour": 15, "minute": 0}
    }
  }