{"id":33376338,"url":"https://github.com/swatchtime/swatch-preact","last_synced_at":"2026-06-12T15:32:01.562Z","repository":{"id":324994422,"uuid":"1099292192","full_name":"swatchtime/swatch-preact","owner":"swatchtime","description":"A Preact rewrite of the Swatch Internet Time clock","archived":false,"fork":false,"pushed_at":"2026-02-16T12:49:18.000Z","size":287,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-16T20:58:07.302Z","etag":null,"topics":["clock","clocks","internet-time","javascript","preact","pwa","pwa-app","swatch","swatch-internet","swatch-internet-time","swatch-time","time"],"latest_commit_sha":null,"homepage":"https://swatchtime.online","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/swatchtime.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-18T20:19:43.000Z","updated_at":"2026-02-16T12:50:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/swatchtime/swatch-preact","commit_stats":null,"previous_names":["kendawson-online/swatch-preact","swatchtime/swatch-preact"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/swatchtime/swatch-preact","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatchtime%2Fswatch-preact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatchtime%2Fswatch-preact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatchtime%2Fswatch-preact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatchtime%2Fswatch-preact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swatchtime","download_url":"https://codeload.github.com/swatchtime/swatch-preact/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatchtime%2Fswatch-preact/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34251774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":["clock","clocks","internet-time","javascript","preact","pwa","pwa-app","swatch","swatch-internet","swatch-internet-time","swatch-time","time"],"created_at":"2025-11-23T00:01:11.485Z","updated_at":"2026-06-12T15:32:01.557Z","avatar_url":"https://github.com/swatchtime.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swatch Internet Time\n\nversion 0.2.0-beta\n\nA modern Preact application for displaying and managing Swatch Internet Time (.beats), featuring reminder integration, time conversion, and customizable settings.\n\n\u003cimg src=\"public/screenshot.png\" /\u003e\n\n## About Swatch Internet Time\n\nSwatch Internet Time is a decimal time concept introduced by the Swatch corporation in 1998. It divides the day into 1,000 \"beats\" instead of hours, minutes, and seconds. Each beat is equivalent to 1 minute and 26.4 seconds. The day starts at midnight BMT (Biel Mean Time, UTC+1).\n\n**Learn more:**\n\n- https://www.swatch.com/en-us/internet-time.html\n\n- https://en.wikipedia.org/wiki/Swatch_Internet_Time\n\n\n## App Features\n\n### Core Display\n- **Real-time Swatch Internet Time Clock**: Displays current time in .beats format (@000.00 - @999.99)\n- **Includes centibeats**: Displays .beat time with 2 decimal places of accuracy\n- **Updates every second** for accurate timekeeping\n- **Customizable display** with multiple font options and sizes\n- **Light/Dark Theme**: Toggle between light and dark themes\n\n### Settings Panel\nAccess via the gear icon to customize your experience:\n- **Font Color**: Choose any color for the time display\n- **Font Size**: Adjust from 20px to 200px with a slider\n- **Font Family**: Select from 4 Google Fonts:\n  - Roboto\n  - Open Sans\n  - Lato\n  - Montserrat\n- **Show Local Time**: Toggle to display local time below Swatch time\n- **12/24-Hour Format**: Switch between 12-hour (AM/PM) and 24-hour format for local time\n\n\n### Reminders\nCreate and manage simple reminders using Swatch Internet Time:\n- **Reminder Creation Form**:\n  - Title and Description\n  - Start Date \u0026 Time (or enter Swatch beats)\n  - Reminders are single occurrences (no repeat options)\n  - Swatch beats accepted in formats like `@123`, `123.45`\n\n### Reminder System\nBell icon feature for event notifications:\n- **Visual indicator**: Bell icon highlights when reminders are active\n- **Modal notifications**: Displays event details when reminder time arrives\n- **Dual actions**:\n  - **OK**: Acknowledges reminder but keeps bell icon active\n  - **Dismiss**: Removes reminder and clears bell notification\n- **Reopen reminders**: Click bell icon to view active reminders again\n- **Persistent until dismissed**: Bell remains highlighted until dismissed\n\n### Time Calculator\nConvert between Swatch and Local time:\n- **Calculator icon** opens conversion tool\n- **Bidirectional conversion**: \n  - Enter Swatch beats → Get local time (HH:MM:SS)\n  - Enter local time → Get Swatch beats\n- **Real-time updates**: Changes in one field automatically update the other\n- **24-hour format** for local time input/output\n\n## Technology Stack\n\n- **Preact 10.27.2**: Fast 3kB alternative to React with the same modern API\n- **Vite 7.2.2**: Next-generation frontend tooling for fast development\n- **Bootstrap 5.3.8**: Latest Bootstrap for responsive UI and modals\n- **Bootstrap Icons**: Icon library for UI elements\n- **Google Fonts**:  stored in a JSON file at: public/google-fonts.json\n\n## Architecture\n\n```\nswatch-preact/\n├── index.html\n├── package.json\n├── package-lock.json\n├── public\n│   ├── google-fonts.json\n│   ├── manifest.json\n│   ├── screenshot.png\n│   ├── swiss-flag.svg\n│   └── sw.js\n├── README.md\n├── src\n│   ├── app.jsx\n│   ├── components\n│   │   ├── ColorPicker.jsx\n│   │   ├── FontPreview.jsx\n│   │   ├── Footer.jsx\n│   │   ├── Navbar.jsx\n│   │   ├── ReminderBell.jsx\n│   │   ├── ReminderForm.jsx\n│   │   ├── RemindersList.jsx\n│   │   ├── SettingsModal.jsx\n│   │   ├── SwatchClock.jsx\n│   │   └── TimeCalculator.jsx\n│   ├── hooks\n│   │   └── useBootstrapModal.js\n│   ├── main.jsx\n│   ├── signals\n│   │   └── store.js\n│   ├── styles.css\n│   └── utils\n│       ├── fonts.js\n│       ├── notifications.js\n│       ├── reminderTime.js\n│       ├── storage.js\n│       └── swatchTime.js\n└── vite.config.js\n\n7 directories, 30 files\n```\n\n## Important: Rounding and display\n\nWhen rendering centibeats (two decimal places) the app and any related code should avoid temporarily displaying `1000.00` due to rounding. The correct approach is to round the raw beats to two decimals, then wrap any value \u003e= 1000 back into the 0..999.99 range before formatting for display. Example:\n\n```js\nconst rawBeats = bielSeconds / 86.4;\nlet rounded = Math.round(rawBeats * 100) / 100;\nif (rounded \u003e= 1000) rounded = rounded - 1000;\nconst display = rounded.toFixed(2);\n```\n\nThis preserves conventional rounding while guaranteeing the UI never shows `1000.00` briefly.\n\n## Browser Support\n\n- Modern browsers with ES6+ support\n- Chrome, Firefox, Safari, Edge (latest versions)\n\n## License\n\n[MIT License](LICENSE)\n\n## Contact\n\nContact: admin@swatchtime.online\n\n\n## Disclaimer:\n\nThis site is an independent revival of Swatch Internet Time and is not affiliated with Swatch Group. You can visit the official Swatch web site here: \u003ca href=\"https://www.swatch.com/en-us/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003ehttps://www.swatch.com/\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswatchtime%2Fswatch-preact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswatchtime%2Fswatch-preact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswatchtime%2Fswatch-preact/lists"}