{"id":41352760,"url":"https://github.com/boertel/duration","last_synced_at":"2026-01-23T07:27:38.403Z","repository":{"id":46065886,"uuid":"426676166","full_name":"boertel/duration","owner":"boertel","description":"TypeScript library to format durations (days, hours, minutes and seconds)","archived":false,"fork":false,"pushed_at":"2025-03-28T16:40:19.000Z","size":239,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T15:09:26.304Z","etag":null,"topics":["library"],"latest_commit_sha":null,"homepage":"https://github.com/boertel/duration","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/boertel.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-10T15:30:52.000Z","updated_at":"2025-03-28T16:40:24.000Z","dependencies_parsed_at":"2024-04-09T22:28:56.402Z","dependency_job_id":"af0c3429-6361-4629-a550-032a6bb3fdce","html_url":"https://github.com/boertel/duration","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":0.09090909090909094,"last_synced_commit":"c2597200628f99eb938178f942d049ebcea13735"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/boertel/duration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boertel%2Fduration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boertel%2Fduration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boertel%2Fduration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boertel%2Fduration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boertel","download_url":"https://codeload.github.com/boertel/duration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boertel%2Fduration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28683194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["library"],"created_at":"2026-01-23T07:27:37.762Z","updated_at":"2026-01-23T07:27:38.394Z","avatar_url":"https://github.com/boertel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# duration\n\nTypeScript library to format durations (days, hours, minutes, seconds, and milliseconds)\n\n## Install\n\n```\nnpm install @boertel/duration\n```\n\n## Usage\n\n```javascript\nimport { duration } from \"@boertel/duration\";\n\nconsole.log(duration(2892992000).format(\"d DD, h HH [and] m MM\"));\n// 33 days, 11 hours and 36 minutes\n\n// more readable way to create a duration:\nconst d = duration().days(2).hours(5).seconds(4);\n// this will ignore 0 values and join with commas and \"and\"\nconsole.log(d.format([\"dD\", \"hH\", \"mM\", \"sS\"]));\n// 2d, 5h and 4s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboertel%2Fduration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboertel%2Fduration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboertel%2Fduration/lists"}