{"id":19427931,"url":"https://github.com/gappeah/time-calculator","last_synced_at":"2025-02-25T05:22:46.579Z","repository":{"id":191433539,"uuid":"684666365","full_name":"gappeah/time-calculator","owner":"gappeah","description":"As part of my five projects for freeCodeCamp Scientific Computing with Python","archived":false,"fork":false,"pushed_at":"2023-08-29T16:01:54.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T19:44:39.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/gappeah.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}},"created_at":"2023-08-29T15:55:00.000Z","updated_at":"2024-09-12T11:00:45.000Z","dependencies_parsed_at":"2023-08-29T23:13:05.935Z","dependency_job_id":null,"html_url":"https://github.com/gappeah/time-calculator","commit_stats":null,"previous_names":["gappeah/time-calculator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gappeah%2Ftime-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gappeah%2Ftime-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gappeah%2Ftime-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gappeah%2Ftime-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gappeah","download_url":"https://codeload.github.com/gappeah/time-calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240607636,"owners_count":19828272,"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-11-10T14:13:19.035Z","updated_at":"2025-02-25T05:22:46.544Z","avatar_url":"https://github.com/gappeah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"I created a function called `add_time` which takes three parameters:\n\n1. A starting time in the 12-hour clock format, with either \"AM\" or \"PM\" at the end.\n2. A duration time specified in hours and minutes.\n3. (Optional) A starting day of the week, not case-sensitive.\n\nThe function calculates the result by adding the duration time to the start time and returns the updated time. If the result is the next day, it appends \"(next day)\" to the time. If it's more than one day later, it adds \"(n days later)\" where \"n\" is the number of days.\n\nIf a starting day of the week is provided, the function also displays the resulting day of the week after the time and before the number of days later.\n\nI successfully handled various cases, making sure the formatting is accurate. I paid close attention to proper spacing and punctuation.\n\nHere are some examples:\n\n- Calling `add_time(\"3:00 PM\", \"3:10\")` returns \"6:10 PM\".\n- Calling `add_time(\"11:30 AM\", \"2:32\", \"Monday\")` returns \"2:02 PM, Monday\".\n- Calling `add_time(\"11:43 AM\", \"00:20\")` returns \"12:03 PM\".\n- Calling `add_time(\"10:10 PM\", \"3:30\")` returns \"1:40 AM (next day)\".\n- Calling `add_time(\"11:43 PM\", \"24:20\", \"tueSday\")` returns \"12:03 AM, Thursday (2 days later)\".\n- Calling `add_time(\"6:30 PM\", \"205:12\")` returns \"7:42 AM (9 days later)\".\n\nI completed this project without importing any Python libraries. I assumed valid start times and handled duration times with minutes less than 60. The hour component of the duration can be any whole number.\n\nFor development and testing, I wrote the code in `time_calculator.py` and utilized `main.py` to execute the `time_calculator()` function by clicking the \"run\" button. I confirmed the functionality of my code by using the provided unit tests in `test_module.py`, which were imported into `main.py` for automated testing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgappeah%2Ftime-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgappeah%2Ftime-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgappeah%2Ftime-calculator/lists"}