{"id":18607626,"url":"https://github.com/lozjackson/ember-clock","last_synced_at":"2025-04-10T21:31:46.592Z","repository":{"id":57223576,"uuid":"43734090","full_name":"lozjackson/ember-clock","owner":"lozjackson","description":"Clock service for Ember","archived":false,"fork":false,"pushed_at":"2024-11-04T22:09:12.000Z","size":1711,"stargazers_count":8,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T22:31:44.667Z","etag":null,"topics":["clock","ember","hours","minutes","seconds","time"],"latest_commit_sha":null,"homepage":"http://lozjackson.github.io/ember-clock","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lozjackson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2015-10-06T06:39:54.000Z","updated_at":"2024-08-19T21:27:55.000Z","dependencies_parsed_at":"2024-05-06T22:26:15.689Z","dependency_job_id":"7af6e718-5f6b-470e-860f-93ba125ccb98","html_url":"https://github.com/lozjackson/ember-clock","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lozjackson%2Fember-clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lozjackson%2Fember-clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lozjackson%2Fember-clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lozjackson%2Fember-clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lozjackson","download_url":"https://codeload.github.com/lozjackson/ember-clock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248301504,"owners_count":21080902,"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":["clock","ember","hours","minutes","seconds","time"],"created_at":"2024-11-07T02:30:31.339Z","updated_at":"2025-04-10T21:31:41.581Z","avatar_url":"https://github.com/lozjackson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-clock\n\nThis is an Ember-cli addon that provides a clock service. The clock synchronizes to\nthe local host system clock and can be used to display the time or to update time\nsensitive properties.\n\n## Compatibility\n\n2.x requires Ember 4+ and Node 18.18+\n\n## Breaking Changes in 2.0.0\n\nv2.0.0 removes implicit injections as these are deprecated in Ember 3.x and removed\nin Ember 4.x. You must explicitly inject the clock service like so:\n\n```\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\n\nexport default class MyComponent extends Component {\n  @service clock;\n}\n```\n\n## Demo\n\nhttp://lozjackson.github.io/ember-clock/\n\n## Installation\n\n- `ember install ember-clock`\n\n## ClockService\n\nThe clock service should be injected into controllers and components where required.\n\nTo use the clock in a template or in computed properties, bind to the clock's\n`hour`, `minute`, or `second` properties.\n\nIn templates:\n\n```hbs\n{{this.clock.hour}}\n{{this.clock.minute}}\n{{this.clock.second}}\n```\n\nIn computed properties:\n\n```js\n@service clock;\n\nget seconds() {\n  // this will update every second\n  const second = this.clock.second\n  return `${ second } seconds`\n});\n```\n\n## Known Issues\n\nThe clock service will break Ember acceptance tests, as it creates a continuous run loop to update the current time. To disable the runloop update your config/environment file with the following\n\n```js\nmodule.exports = function (environment) {\n  //...\n  if (environment === \"test\") {\n    //...\n    ENV[\"ember-clock\"] = {\n      disabled: true,\n    };\n  }\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flozjackson%2Fember-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flozjackson%2Fember-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flozjackson%2Fember-clock/lists"}