{"id":14990107,"url":"https://github.com/chrisburnell/event-countdown","last_synced_at":"2025-04-05T17:20:25.404Z","repository":{"id":232054961,"uuid":"783361985","full_name":"chrisburnell/event-countdown","owner":"chrisburnell","description":"A Web Component to display an event countdown.","archived":false,"fork":false,"pushed_at":"2024-04-22T10:43:56.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T14:16:03.439Z","etag":null,"topics":["countdown","custom-element","custom-elements","customelement","customelements","javascript","web-component","web-components","webcomponent","webcomponents"],"latest_commit_sha":null,"homepage":"https://chrisburnell.com/event-countdown/","language":"JavaScript","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/chrisburnell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-04-07T17:22:24.000Z","updated_at":"2024-05-09T12:26:35.843Z","dependencies_parsed_at":"2024-05-09T12:26:33.460Z","dependency_job_id":"441b4310-5e1e-4681-8c1f-88fd690cc5fe","html_url":"https://github.com/chrisburnell/event-countdown","commit_stats":null,"previous_names":["chrisburnell/event-countdown"],"tags_count":9,"template":false,"template_full_name":"daviddarnes/component-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisburnell%2Fevent-countdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisburnell%2Fevent-countdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisburnell%2Fevent-countdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisburnell%2Fevent-countdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisburnell","download_url":"https://codeload.github.com/chrisburnell/event-countdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247370607,"owners_count":20928047,"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":["countdown","custom-element","custom-elements","customelement","customelements","javascript","web-component","web-components","webcomponent","webcomponents"],"created_at":"2024-09-24T14:19:27.950Z","updated_at":"2025-04-05T17:20:25.377Z","avatar_url":"https://github.com/chrisburnell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `event-countdown`\n\nA Web Component to display an event countdown.\n\n**[Demo](https://chrisburnell.github.io/event-countdown/demo.html)** | **[Further reading](https://chrisburnell.com/event-countdown/)**\n\n## Usage\n\n### General usage example\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003cevent-countdown name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n### With end point\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003cevent-countdown name=\"My event\"\u003eMy event ends on \u003ctime end datetime=\"2024-04-09T23:59:59-12:00\"\u003e9 April 2024 23:59:59 UTC-12\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n### Both start and end points\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003cevent-countdown name=\"My event\" start=\"2024-04-09T00:00:00+14:00\" end=\"2024-04-09T23:59:59-12:00\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e and ends on \u003ctime end datetime=\"2024-04-09T23:59:59-12:00\"\u003e9 April 2024 23:59:59 UTC-12\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n### Annual events\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Roll over to next year if event has passed --\u003e\n\u003cevent-countdown annual=\"true\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n### Update frequency\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Updates every 1 second --\u003e\n\u003cevent-countdown update=\"1\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n\n\u003c!-- Disable updates --\u003e\n\u003cevent-countdown update=\"false\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n### Specific division\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Always format using seconds --\u003e\n\u003cevent-countdown division=\"second\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n### Maximum division\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Format using seconds up to minutes --\u003e\n\u003cevent-countdown max-division=\"minute\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n### Numeric format\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Automatically choose when to use numbers vs. words in formatting --\u003e\n\u003cevent-countdown format-numeric=\"auto\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n\n\u003c!-- Always use numbers in time formatting --\u003e\n\u003cevent-countdown format-numeric=\"always\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n### Style format\n\n```html\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Long formatting (e.g. 1 second) --\u003e\n\u003cevent-countdown format-style=\"long\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n\n\u003c!-- Short formatting (e.g. 1 sec.) --\u003e\n\u003cevent-countdown format-style=\"short\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n\n\u003c!-- Narrow formatting (e.g. 1s) --\u003e\n\u003cevent-countdown format-style=\"narrow\" name=\"My event\"\u003eMy event starts on \u003ctime start datetime=\"2024-04-09T00:00:00+14:00\"\u003e9 April 2024 00:00:00 UTC+14\u003c/time\u003e.\u003c/event-countdown\u003e\n```\n\n## Installation\n\nYou have a few options (choose one of these):\n\n1. Install via [npm](https://www.npmjs.com/package/@chrisburnell/event-countdown): `npm install @chrisburnell/event-countdown`\n1. [Download the source manually from GitHub](https://github.com/chrisburnell/event-countdown/releases) into your project.\n1. Skip this step and use the script directly via a 3rd party CDN (not recommended for production use)\n\n## Usage\n\nMake sure you include the `\u003cscript\u003e` in your project (choose one of these):\n\n```html\n\u003c!-- Host yourself --\u003e\n\u003cscript type=\"module\" src=\"event-countdown.js\"\u003e\u003c/script\u003e\n```\n\n```html\n\u003c!-- 3rd party CDN, not recommended for production use --\u003e\n\u003cscript\n  type=\"module\"\n  src=\"https://www.unpkg.com/@chrisburnell/event-countdown/event-countdown.js\"\n\u003e\u003c/script\u003e\n```\n\n```html\n\u003c!-- 3rd party CDN, not recommended for production use --\u003e\n\u003cscript\n  type=\"module\"\n  src=\"https://esm.sh/@chrisburnell/event-countdown\"\n\u003e\u003c/script\u003e\n```\n\n## Credit\n\nWith thanks to the following people:\n\n- [David Darnes](https://darn.es) for creating this [Web Component repo template](https://github.com/daviddarnes/component-template)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisburnell%2Fevent-countdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisburnell%2Fevent-countdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisburnell%2Fevent-countdown/lists"}