{"id":16159807,"url":"https://github.com/robertherber/clock-format-utility","last_synced_at":"2025-03-18T21:32:00.276Z","repository":{"id":57200488,"uuid":"96141265","full_name":"robertherber/clock-format-utility","owner":"robertherber","description":"A tiny library for 12/24 hour clock formatting. The main use-case is to support non-standard language/localization combinations - specifically in moment.","archived":false,"fork":false,"pushed_at":"2017-09-16T17:21:40.000Z","size":93,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T12:25:03.987Z","etag":null,"topics":["24hour","clock","javascript","react-native"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/robertherber.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}},"created_at":"2017-07-03T18:54:08.000Z","updated_at":"2019-08-16T14:49:01.000Z","dependencies_parsed_at":"2022-09-16T15:10:39.906Z","dependency_job_id":null,"html_url":"https://github.com/robertherber/clock-format-utility","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherber%2Fclock-format-utility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherber%2Fclock-format-utility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherber%2Fclock-format-utility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherber%2Fclock-format-utility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertherber","download_url":"https://codeload.github.com/robertherber/clock-format-utility/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950813,"owners_count":20373664,"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":["24hour","clock","javascript","react-native"],"created_at":"2024-10-10T01:59:51.162Z","updated_at":"2025-03-18T21:31:57.521Z","avatar_url":"https://github.com/robertherber.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clock-format-utility\n[ ![Codeship Status for robertherber/clock-format-utility](https://app.codeship.com/projects/78dc88f0-7cf6-0135-5c44-361f0802280c/status?branch=master)](https://app.codeship.com/projects/245786)\n\n\nThis is a tiny library used to set 12/24 hour clock formatting.\nThe main use-case is to **support non-standard language/localization combinations** - specifically in moment.\n\nIt exposes the following methods; two detection methods:\n\n- **detectDeviceClockFormat**\n  - by parsing `date.toLocaleString(detectedDeviceLocale)`\n- **detectDeviceLocale**\n  - using `react-native-device-info` or (if not available) `navigator.language`\n\nAnd two specifically aimed at configuring moment:\n\n- **setMomentLocaleClockFormat**\n  - overrides current moment locale clock format with detected device clock format\n- **setMomentLocale**\n  - sets `moment.locale` to the detected device locale\n\nPlease feel free to submit pull-requests for other libraries (`detectDeviceLocale` could benefit from supporting more libraries than `react-native-device-info`, and setters for `date-fns` would be very welcome)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertherber%2Fclock-format-utility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertherber%2Fclock-format-utility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertherber%2Fclock-format-utility/lists"}