{"id":15687075,"url":"https://github.com/linusu/node-parse-iso-duration","last_synced_at":"2025-05-07T17:14:05.007Z","repository":{"id":26371929,"uuid":"29821176","full_name":"LinusU/node-parse-iso-duration","owner":"LinusU","description":"Parse an ISO 8601 duration to milliseconds","archived":false,"fork":false,"pushed_at":"2020-12-04T16:07:56.000Z","size":10,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T17:13:59.846Z","etag":null,"topics":["hacktoberfest","iso8601","iso8601-duration","parse"],"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/LinusU.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":"2015-01-25T16:40:07.000Z","updated_at":"2023-01-19T05:07:37.000Z","dependencies_parsed_at":"2022-08-28T23:11:48.737Z","dependency_job_id":null,"html_url":"https://github.com/LinusU/node-parse-iso-duration","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-parse-iso-duration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-parse-iso-duration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-parse-iso-duration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-parse-iso-duration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinusU","download_url":"https://codeload.github.com/LinusU/node-parse-iso-duration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922335,"owners_count":21825639,"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":["hacktoberfest","iso8601","iso8601-duration","parse"],"created_at":"2024-10-03T17:43:02.036Z","updated_at":"2025-05-07T17:14:04.986Z","avatar_url":"https://github.com/LinusU.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-parse-iso-duration\n\nParse an ISO 8601 duration to milliseconds\n\n## Instalation\n\n```sh\nnpm install --save parse-iso-duration\n```\n\n## Usage\n\n```javascript\nvar parseIsoDuration = require('parse-iso-duration');\n\nparseIsoDuration('PT8S');   // 8 * 1000\nparseIsoDuration('PT10M');  // 10 * 60 * 1000\nparseIsoDuration('PT20H');  // 20 * 60 * 60 * 1000\nparseIsoDuration('PT6M4S'); // 6 * 60 * 1000 + 4 * 1000\n\nparseIsoDuration('Hello world'); // Throws \"Invalid duration\"\nparseIsoDuration('P10Y10M10D');  // Throws \"Ambiguous duration\"\n```\n\n## Year and month\n\nIf years or months is specified and more than 0 the library will throw `\"Ambiguous duration\"` since it's meaning can't be converted to milliseconds.\n\n## Related\n\n- Swift version: [LinusU/ParseISODuration](https://github.com/LinusU/ParseISODuration)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fnode-parse-iso-duration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinusu%2Fnode-parse-iso-duration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fnode-parse-iso-duration/lists"}