{"id":18614937,"url":"https://github.com/andrewjbateman/javascript-clock","last_synced_at":"2026-04-19T19:32:53.141Z","repository":{"id":96860544,"uuid":"156969856","full_name":"AndrewJBateman/javascript-clock","owner":"AndrewJBateman","description":":clipboard: Create a clock using vanilla javascript, css and html, from Wes Bos youtube Javascript360 tutorial 2","archived":false,"fork":false,"pushed_at":"2022-03-11T17:35:05.000Z","size":5078,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T01:34:28.992Z","etag":null,"topics":["css","html","javascript","javascript30"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/AndrewJBateman.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":"2018-11-10T10:16:35.000Z","updated_at":"2022-03-11T17:35:08.000Z","dependencies_parsed_at":"2023-03-30T11:37:14.835Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/javascript-clock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/javascript-clock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fjavascript-clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fjavascript-clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fjavascript-clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fjavascript-clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/javascript-clock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fjavascript-clock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32020571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["css","html","javascript","javascript30"],"created_at":"2024-11-07T03:27:33.515Z","updated_at":"2026-04-19T19:32:53.114Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"CSS","readme":"# :zap: Javascript Clock\n\n* Wes Bos Youtube Tutorial: [We build a CSS + JS Clock in Vanilla JS — #JavaScript30 2/30](https://www.youtube.com/watch?v=xu87YWbr4X0\u0026list=PLu8EoSxDXHP6CGK4YVJhL_VWetA865GOH\u0026index=2).\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/javascript-clock?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/javascript-clock?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/javascript-clock?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/javascript-clock?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Javascript Clock](#zap-javascript-clock)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Tutorial Code to create a working clock using just HTML, CSS \u0026 javascript.\n\n## :camera: Screenshots\n\n![Example screenshot](./img/clock.png).\n\n## :signal_strength: Technologies\n\n* Ran in Google Chrome browser with: [Javascript engine V8 for Windows (x64)](https://v8.dev/).\n\n## :floppy_disk: Setup\n\n* Open index.html in browser. If any code is changed the browser needs to be refreshed.\n\n## :computer: Code Examples\n\n* function to calculate position of clock hands using new Date().\n\n```javascript\nfunction setDate() {\n  const now = new Date();\n  console.log('now', now);\n\n  const seconds = now.getSeconds();\n  const secondsDegrees = ((seconds / 60) * 360) + 90;\n  secondHand.style.transform = `rotate(${secondsDegrees}deg)`;\n\n  const mins = now.getMinutes();\n  const minsDegrees = ((mins / 60) * 360) + ((seconds/60)*6) + 90;\n  minsHand.style.transform = `rotate(${minsDegrees}deg)`;\n\n  const hours = now.getHours();\n  const hoursDegrees = ((hours / 12) * 360) + ((mins/60)*30) + 90;\n  hourHand.style.transform = `rotate(${hoursDegrees}deg)`;\n}\n```\n\n## :cool: Features\n\n* Uses cubic-bezier CSS library for ease-in and ease-out of ticking clock hands.\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: Nothing\n\n## :clap: Inspiration\n\n* [We build a CSS + JS Clock in Vanilla JS — #JavaScript30 2/30](https://www.youtube.com/watch?v=xu87YWbr4X0\u0026list=PLu8EoSxDXHP6CGK4YVJhL_VWetA865GOH\u0026index=2).\n\n## :file_folder: License\n\n* N/A\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fjavascript-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fjavascript-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fjavascript-clock/lists"}