{"id":18415127,"url":"https://github.com/elonehoo/concise-ms","last_synced_at":"2025-04-07T12:31:38.198Z","repository":{"id":54480839,"uuid":"503227093","full_name":"elonehoo/concise-ms","owner":"elonehoo","description":"understandable milliseconds","archived":false,"fork":false,"pushed_at":"2024-04-15T03:11:09.000Z","size":1384,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-17T06:53:32.347Z","etag":null,"topics":["milliseconds","tyepscript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@elonehoo/concise-ms","language":"TypeScript","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/elonehoo.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},"funding":{"github":"elonehoo","open_collective":"elonehoo"}},"created_at":"2022-06-14T05:55:47.000Z","updated_at":"2024-04-20T00:26:55.146Z","dependencies_parsed_at":"2024-02-05T05:27:47.582Z","dependency_job_id":"817eb90a-43e7-4e5b-8d8b-f3583a31dd80","html_url":"https://github.com/elonehoo/concise-ms","commit_stats":{"total_commits":56,"total_committers":3,"mean_commits":"18.666666666666668","dds":0.3392857142857143,"last_synced_commit":"2745a0a8b620eb9505d819f2060de43fd9659275"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elonehoo%2Fconcise-ms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elonehoo%2Fconcise-ms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elonehoo%2Fconcise-ms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elonehoo%2Fconcise-ms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elonehoo","download_url":"https://codeload.github.com/elonehoo/concise-ms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247653078,"owners_count":20973750,"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":["milliseconds","tyepscript"],"created_at":"2024-11-06T03:53:14.285Z","updated_at":"2025-04-07T12:31:37.939Z","avatar_url":"https://github.com/elonehoo.png","language":"TypeScript","funding_links":["https://github.com/sponsors/elonehoo","https://opencollective.com/elonehoo"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./public/logo.svg\" width=\"100px\" height=\"100px\" /\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003econcise-ms\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eConvert milliseconds to string: `1337000000` ➡️ `15d 11h 23m 20s`\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@elonehoo/concise-ms\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@elonehoo/concise-ms?color=81A2BE\u0026label=\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## install\n\n```bash\n# npm\nnpm install @elonehoo/concise-ms\n#yarn\nyarn add @elonehoo/concise-ms\n#pnpm\npnpm install @elonehoo/concise-ms\n```\n\n## usage\n\n```typescript\nimport { conciseMilliseconds } from '@elonehoo/concise-ms'\n\nconciseMilliseconds(1337000000) // =\u003e '15d 11h 23m 20s'\n\nconciseMilliseconds(1337)// =\u003e '1.3s'\n\nconciseMilliseconds(133)// =\u003e '133ms'\n\n// `compact` option\nconciseMilliseconds(1337, { compact: true })// =\u003e '1s'\n\n// `verbose` option\nconciseMilliseconds(1335669000, { verbose: true })// =\u003e '15 days 11 hours 1 minute 9 seconds'\n\n// `colonNotation` option\nconciseMilliseconds(95500, { colonNotation: true })// =\u003e '1:35.5'\n\n// `formatSubMilliseconds` option\nconciseMilliseconds(100.400080, { formatSubMilliseconds: true })// =\u003e '100ms 400µs 80ns'\n\n// Can be useful for time durations\nconciseMilliseconds(new Date(2014, 0, 1, 10, 40) - new Date(2014, 0, 1, 10, 5))// =\u003e '35m'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felonehoo%2Fconcise-ms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felonehoo%2Fconcise-ms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felonehoo%2Fconcise-ms/lists"}