{"id":17329930,"url":"https://github.com/coderbyheart/teacher-schedule-kata","last_synced_at":"2025-03-27T05:43:51.447Z","repository":{"id":164859565,"uuid":"640282748","full_name":"coderbyheart/teacher-schedule-kata","owner":"coderbyheart","description":"Develop a teaching lesson planner and learn about date and time zones","archived":false,"fork":false,"pushed_at":"2023-05-13T15:25:15.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"saga","last_synced_at":"2025-02-01T11:11:08.891Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderbyheart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-13T15:18:40.000Z","updated_at":"2023-05-13T15:20:51.000Z","dependencies_parsed_at":"2024-06-20T18:25:01.351Z","dependency_job_id":null,"html_url":"https://github.com/coderbyheart/teacher-schedule-kata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderbyheart%2Fteacher-schedule-kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderbyheart%2Fteacher-schedule-kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderbyheart%2Fteacher-schedule-kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderbyheart%2Fteacher-schedule-kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderbyheart","download_url":"https://codeload.github.com/coderbyheart/teacher-schedule-kata/tar.gz/refs/heads/saga","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791927,"owners_count":20672669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T14:49:50.423Z","updated_at":"2025-03-27T05:43:51.422Z","avatar_url":"https://github.com/coderbyheart.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Teacher Schedule Kata\n\nGeneral notes:\n\n- Timestamps are stored as a datetime string with the Time Zone Identifier separately, because this is how users enter these dates into the system.\n- List of time zones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n\n## Part 1: Occasional lessons with student Time zones\n\nThe student Markus want's a lesson on Friday, the 12th of May at 18:00 local time.\n\n| Student | Date Time           | Duration   | Time zone identifier |\n| ------- | ------------------- | ---------- | -------------------- |\n| Markus  | 2023-05-12T18:00:00 | 60 minutes | Africa/Cairo         |\n\nThere are already other scheduled lessons for these students and teachers\n\n| Student | Date Time           | Duration   | Teacher | Time zone identifier |\n| ------- | ------------------- | ---------- | ------- | -------------------- |\n| Alex    | 2023-05-12T17:00:00 | 30 minutes | Gustavo | Africa/Cairo         |\n| Blake   | 2023-05-12T19:00:00 | 30 minutes | Gustavo | Africa/Cairo         |\n\nImplement a function called `teacherIsAvailable(teacherName, startTime, duration)` that returns a boolean whether the teacher is available during the requested time.\n\n```\nteacherIsAvailable(Gustavo, 2023-05-12T18:00:00+01:00, 60 minutes) // true\n```\n\nAdding this lesson for the student Charlie who is in Florida, the function should return false\n\n| Student | Date Time           | Duration   | Teacher | Time zone identifier |\n| ------- | ------------------- | ---------- | ------- | -------------------- |\n| Charlie | 2023-05-12T12:30:00 | 60 minutes | Gustavo | America/New_York     |\n\n## Part 2: Present teachers scheduled lessons on the local Time zone of the user\n\nAs a student I want to see the scheduled lessons of a teacher, so I can request a new lesson in an available time-slot.\n\nGiven these lessons for Gustavo, who is located in Canberra in Australia:\n\n| Student | Date Time           | Duration   | Time zone identifier |\n| ------- | ------------------- | ---------- | -------------------- |\n| Alex    | 2023-05-12T17:00:00 | 30 minutes | Australia/Sydney     |\n| Blake   | 2023-05-12T19:00:00 | 30 minutes | Australia/Sydney     |\n| Charlie | 2023-05-12T12:30:00 | 60 minutes | Australia/Sydney     |\n\nReturn the time of these lessons in the student Markus' local time, who is on Tenerife in Spain.\n\n## Part 3: Recurring lessons\n\nGiven that Markus wants to schedule a recurring lesson every week like this:\n\n| Start date          | Duration   | Time zone identifier |\n| ------------------- | ---------- | -------------------- |\n| 2023-05-12T17:00:00 | 30 minutes | Africa/Cairo         |\n\nImplement a function `teacherIsAvailableForRecurringLesson(teacherName, startTime, duration)` that returns a boolean.\n\nUsing these scheduled sessions for the teacher:\n\n| Student | Date Time           | Duration   | Time zone identifier |\n| ------- | ------------------- | ---------- | -------------------- |\n| Alex    | 2023-05-19T17:00:00 | 30 minutes | Africa/Cairo         |\n\nthis should return `false` because there is a conflict.\n\n### Also consider Daylight Savings Time Changes!\n\n| Date Time           | Time zone identifier |\n| ------------------- | -------------------- |\n| 2023-10-27T17:00:00 | Europe/Madrid        |\n\nUsing these scheduled sessions for the teacher:\n\n| Student | Date Time           | Duration   | Time zone identifier |\n| ------- | ------------------- | ---------- | -------------------- |\n| Alex    | 2023-10-27T16:00:00 | 30 minutes | Atlantic/Reykjavik   |\n| Alex    | 2023-11-03T16:00:00 | 30 minutes | Atlantic/Reykjavik   |\n\nthe function should return `false` because there is now a conflict for the second entry.\n\n\u003e Instructor Notes: `Atlantic/Reykjavik` has no DST, but `Europe/Madrid` has.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderbyheart%2Fteacher-schedule-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderbyheart%2Fteacher-schedule-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderbyheart%2Fteacher-schedule-kata/lists"}