{"id":24764460,"url":"https://github.com/seamapi/seam-tod","last_synced_at":"2025-03-23T16:28:00.759Z","repository":{"id":211999921,"uuid":"617616809","full_name":"seamapi/seam-tod","owner":"seamapi","description":"Seam Standard for Time of Day Strings","archived":false,"fork":false,"pushed_at":"2025-02-11T01:52:00.000Z","size":116,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-19T09:42:58.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/seamapi.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}},"created_at":"2023-03-22T18:56:16.000Z","updated_at":"2024-01-10T03:29:47.000Z","dependencies_parsed_at":"2023-12-12T02:45:37.516Z","dependency_job_id":null,"html_url":"https://github.com/seamapi/seam-tod","commit_stats":null,"previous_names":["seamapi/seam-tod"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-tod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-tod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-tod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fseam-tod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seamapi","download_url":"https://codeload.github.com/seamapi/seam-tod/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245130178,"owners_count":20565609,"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":[],"created_at":"2025-01-28T22:31:22.673Z","updated_at":"2025-03-23T16:28:00.730Z","avatar_url":"https://github.com/seamapi.png","language":"TypeScript","readme":"# Seam TOD (Time of Day)\n\nSeam TOD is a standard for accepting and representing the\ntime of day. This repository contains the reference implementation and the\nspecification.\n\n## Motivation\n\nISO8601/RFC3339 is a standard for representing a point in time. This is an\nexcellent standard, but does not work well for representing recurring daily\nevents such as a meeting that occurs every day at 9am.\n\nThe iCal standard is a standard for representing recurring events, but isn't\nwidely an accepted standard for representing simple daily recurring events, most\nAPIs choose to implement something simpler, such as an object like the following:\n\n```json\n{\n  \"hour\": 9,\n  \"minute\": 0,\n  \"timezone\": \"America/New_York\"\n}\n```\n\nThere is a proposed revision to RFC3339 that would add support for timezone\nrepresentations, but it has not yet been adopted. [The proposed revision](https://datatracker.ietf.org/doc/draft-ietf-sedate-datetime-extended/)\nmotivates the syntax of `seam-tod`\n\n`seam-tod` is timezone-aware. Handling time-zone unaware times complicates\nsyntax and timezones are generally very important when dealing with time of day strings.\n\n## Format\n\n### Examples\n\nThe following examples are all valid `seam-tod` strings (NOTE: they are not equivalent)\n\n- `09:00:00-05:00`\n- `09:00:00Z`\n- `09:00:00[America/Los_Angeles]`\n\nThe following are NOT valid `seam-tod` strings:\n\n- `09:00:00Z[America/Los_Angeles]` (redundant time offset)\n- `09:00:00-08:00[America/Los_Angeles]` (redundant time offset)\n\n## Generous Acceptance\n\n### Examples\n\nAll of the following should be accepted and converted into\na `seam-tod` string:\n\n- `{ hour: 9, minute: 0, timezone: \"America/New_York\" }`\n- `9am America/New_York`\n- `9am EST`\n- `9am EDT`\n- `13:00:00 America/New_York`\n- `13:00:00[America/New_York]`\n- `13:00 EDT`\n- `12:00Z`\n- `12:00-05:00`\n- `9:00[EST]`\n\nThe following CANNOT be converted to `seam-tod` strings:\n\n- `9am` (ambiguous timezone)\n- `13:00` (ambiguous timezone)\n- `9amZ` (unusual use case)\n\n### Acceptable Timezone Specificers\n\n- IANA Timezones (America/Los_Angeles)\n- NIST Timezones (EST, EDT, UTC)\n\n## Strict Seam TOD Output\n\nA Strict Seam TOD Output is a strict output that should be emitted by APIs. There\nis exactly one Strict Seam TOD Output representation of a timezone time pair. The\nrules for constructing a Strict Seam TOD Output are as follows:\n\n- Start with `HH:MM:SS.mmm[TIMEZONE]`\n  - `HH` - hours with `0` left pad such that it is exactly two characters\n  - `MM` - minutes with `0` left pad such that it is exactly two characters\n  - `SS` - seconds with `0` left pad such that it is exactly two characters\n  - `mmm` - milliseconds with `0` left pad such that it is exactly three characters\n  - `TIMEZONE` - the relevant IANA timezone\n- If representing an offset (not a timezone), compute the offset by adjusting for a new `HH`, `MM`, `SS` and `mmm` and set the `TIMEZONE` to `UTC`\n- If `mmm` is `000` and `SS` is `00`, remove `SS.mmm`\n- If `SS` is NOT `00` and `mmm` is `000`, remove `.mmm`\n\n\n### Examples\n\n- `01:23:12.543[PST]` - 1:23am plus 12.543 seconds Pacific Standard Timezone\n- `01:23:12[PST]` - 1:23am plus 12 seconds Pacific Standard Timezone\n- `01:23[PST]` - 1:23am Pacific Standard Timezone\n- `01:00[PST]` - 1am Pacific Standard Timezone\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fseam-tod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseamapi%2Fseam-tod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fseam-tod/lists"}