{"id":26228942,"url":"https://github.com/thunderpoot/webdelta","last_synced_at":"2025-08-18T05:34:07.090Z","repository":{"id":255035410,"uuid":"848324285","full_name":"thunderpoot/webdelta","owner":"thunderpoot","description":"A JavaScript utility for web pages that creates dynamic, human-readable dates, times, and relative time descriptions from UNIX timestamps.","archived":false,"fork":false,"pushed_at":"2024-08-28T12:46:14.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T14:43:08.367Z","etag":null,"topics":["duration","iso8601","javascript","timestamps","web","web-development"],"latest_commit_sha":null,"homepage":"https://thunderpoot.github.io/webdelta/","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/thunderpoot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"thunderpoot"}},"created_at":"2024-08-27T14:54:24.000Z","updated_at":"2024-12-11T23:57:04.000Z","dependencies_parsed_at":"2024-08-27T17:12:56.732Z","dependency_job_id":"e3b62326-d397-4a93-b8ee-0e8429530b9a","html_url":"https://github.com/thunderpoot/webdelta","commit_stats":null,"previous_names":["thunderpoot/webdelta"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/thunderpoot/webdelta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderpoot%2Fwebdelta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderpoot%2Fwebdelta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderpoot%2Fwebdelta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderpoot%2Fwebdelta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thunderpoot","download_url":"https://codeload.github.com/thunderpoot/webdelta/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderpoot%2Fwebdelta/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270949800,"owners_count":24673908,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"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":["duration","iso8601","javascript","timestamps","web","web-development"],"created_at":"2025-03-12T21:34:42.975Z","updated_at":"2025-08-18T05:34:07.060Z","avatar_url":"https://github.com/thunderpoot.png","language":"JavaScript","funding_links":["https://github.com/sponsors/thunderpoot"],"categories":[],"sub_categories":[],"readme":"# Δδ\n\n## webdelta.js\n\nhttps://thunderpoot.github.io/webdelta/\n\n`webdelta.js` is a versatile JavaScript utility that allows you to easily convert UNIX timestamps into human-readable dates, times, and relative time descriptions directly on your webpages. This script dynamically displays time information with customisable tooltips and formats.\n\n### Features\n\n- **Automatic Conversion**: Converts UNIX timestamps to readable date and time formats.\n- **Time Zone Support**: Automatically displays times in the user's local time zone or a custom time zone of your choice.\n- **Localised**: Makes use of the JavaScript Intl API to support [multiple locales](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).\n- **Relative Time Descriptions**: Displays relative time (e.g., \"2 minutes ago\" or \"in 3 days\") with live updating tooltips.\n- **Custom Formatting**: Choose from various formatting options like `short`, `medium`, `long`, and `full` for dates and times.\n- **Tooltip Customisation**: Fully customisable tooltips with adjustable styles and behaviours, including support for dynamic updates every second.\n- **Synchronisation**: Ensures that all time updates are perfectly synchronised with the real-time clock.\n- **Easy Integration**: Just include the script on your webpage and add the appropriate classes to your tags.\n- **Multiple Display Modes**: Display only the date, only the time, or both, with or without time zones.\n\n### Installation\n\n#### CDN:\n\nInclude the script in your HTML:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/thunderpoot/webdelta@1.0.2/dist/webdelta.min.js\"\u003e\u003c/script\u003e\n```\n\n#### Download:\n\n1. Download the `webdelta.js` file and include it in your project.\n2. Add the following line in your HTML:\n\n```html\n\u003cscript src=\"path/to/webdelta.js\"\u003e\u003c/script\u003e\n```\n\n### Usage\n\n1. Add the `webDelta` class to any `\u003cspan\u003e` element containing a UNIX timestamp:\n\n```html\n\u003cspan class=\"webDelta\"\u003e1724769141\u003c/span\u003e\n```\n\n2. Customise the display using additional classes:\n\n```html\n\u003cspan class=\"webDelta dateOnly weekday\"\u003e1724769141\u003c/span\u003e\n```\n\n### Available Options\n\n| Class       | Description                                                    |\n|-------------|----------------------------------------------------------------|\n| `raw`       | Don't reformat the date, preserve the UNIX timestamp.          |\n| `dateOnly`  | Display only the date (with time zone unless `noTZ` is present)|\n| `timeOnly`  | Display only the time (with time zone unless `noTZ` is present)|\n| `iso8601`   | Display the date and time in ISO 8601 format                   |\n| `short`     | Display the date and time in a short format                    |\n| `medium`    | Display the date and time in a medium format                   |\n| `long`      | Display the date and time in a long format                     |\n| `full`      | Display the date and time in a full format                     |\n| `weekday`   | Include the full weekday name in the date and time string      |\n| `utc`       | Force the date and time to be displayed in UTC                 |\n| `noTZ`      | Disable the time zone display                                  |\n| `noTooltip` | Disable the tooltip display                                    |\n\n### Configuration\n\nYou can customise the behaviour and appearance of `webdelta.js` by adding the following configuration to your page:\n\n```html\n\u003cscript\u003e\n    window.webDeltaConfig = {\n        tooltipBorderRadius: '8px',\n        tooltipFont: 'Helvetica, sans-serif',\n        tooltipFontSize: '16px',\n        tooltipXOffset: 20,\n        tooltipYOffset: 20,\n        timeZone: 'Europe/Madrid',\n        lang: 'es', // Supports BCP47 values such as sv-SE or en-GB\n        tooltipBackgroundColor: '#333333',\n        tooltipForegroundColor: '#ffcc00'\n    };\n\u003c/script\u003e\n```\n\n### License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n### Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n### Author\n\nT E Vaughan\n\n### Links\n\n- [GitHub Repository](https://github.com/thunderpoot/webdelta)\n- [Issue Tracker](https://github.com/thunderpoot/webdelta/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunderpoot%2Fwebdelta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthunderpoot%2Fwebdelta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunderpoot%2Fwebdelta/lists"}