{"id":17316745,"url":"https://github.com/599316527/duration-time","last_synced_at":"2025-04-14T15:03:12.739Z","repository":{"id":57217209,"uuid":"55128447","full_name":"599316527/duration-time","owner":"599316527","description":"parse / format duration time","archived":false,"fork":false,"pushed_at":"2016-04-01T08:50:11.000Z","size":14,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T04:33:57.876Z","etag":null,"topics":["duration","formatting"],"latest_commit_sha":null,"homepage":null,"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/599316527.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}},"created_at":"2016-03-31T07:10:19.000Z","updated_at":"2019-10-05T09:52:26.000Z","dependencies_parsed_at":"2022-08-28T21:40:23.972Z","dependency_job_id":null,"html_url":"https://github.com/599316527/duration-time","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/599316527%2Fduration-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/599316527%2Fduration-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/599316527%2Fduration-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/599316527%2Fduration-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/599316527","download_url":"https://codeload.github.com/599316527/duration-time/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219843964,"owners_count":16556494,"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":["duration","formatting"],"created_at":"2024-10-15T13:14:05.322Z","updated_at":"2024-10-15T13:14:05.408Z","avatar_url":"https://github.com/599316527.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Duration Time\n====================================\n\n## Usage\n\n```JavaScript\nconst DurationTime = require('duration-time')\n\n// Format a duration time into h:m:s\nDurationTime().format(11111) === '03:05:11'\n\n// Specify colon number\nDurationTime({\n    colonNumber: 1\n}).format(11111) === '185:11'\n\n// Without leading zeros\nDurationTime({\n    hasLeadingZero: false\n}).format(11111) === '3:5:11'\n\n// Always display decimals\nDurationTime({\n    alwaysDisplayDecimals: true\n}).format(11111) === '03:05:11.00'\n\n// Specify decimals width\nDurationTime({\n    keepDecimals: 2\n}).format(11111.1) === '185:11.10'\n\n// Pasre formatted string back\nDurationTime.parse('03:05:11.10') === 11111.1\nDurationTime.parse('185:11') === 11111\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F599316527%2Fduration-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F599316527%2Fduration-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F599316527%2Fduration-time/lists"}