{"id":17197224,"url":"https://github.com/thomaslevesque/iso8601durationhelper","last_synced_at":"2025-04-13T19:52:32.424Z","repository":{"id":64982241,"uuid":"153308077","full_name":"thomaslevesque/Iso8601DurationHelper","owner":"thomaslevesque","description":"Small library to handle ISO8601 durations in C#","archived":false,"fork":false,"pushed_at":"2023-02-07T15:10:41.000Z","size":44,"stargazers_count":33,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T10:37:55.788Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomaslevesque.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-16T15:20:10.000Z","updated_at":"2024-05-12T00:13:33.000Z","dependencies_parsed_at":"2024-11-07T23:10:25.667Z","dependency_job_id":"18a25d16-21cf-45bd-9515-ee0e9aade2dd","html_url":"https://github.com/thomaslevesque/Iso8601DurationHelper","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaslevesque%2FIso8601DurationHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaslevesque%2FIso8601DurationHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaslevesque%2FIso8601DurationHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaslevesque%2FIso8601DurationHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomaslevesque","download_url":"https://codeload.github.com/thomaslevesque/Iso8601DurationHelper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248773849,"owners_count":21159520,"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":[],"created_at":"2024-10-15T01:55:50.735Z","updated_at":"2025-04-13T19:52:32.401Z","avatar_url":"https://github.com/thomaslevesque.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iso8601DurationHelper\n\n[![NuGet version](https://img.shields.io/nuget/v/Iso8601DurationHelper.svg?logo=nuget)](https://www.nuget.org/packages/Iso8601DurationHelper)\n[![AppVeyor build](https://img.shields.io/appveyor/ci/thomaslevesque/iso8601duration.svg?logo=appveyor)](https://ci.appveyor.com/project/thomaslevesque/iso8601duration)\n[![AppVeyor tests](https://img.shields.io/appveyor/tests/thomaslevesque/iso8601duration.svg?logo=appveyor)](https://ci.appveyor.com/project/thomaslevesque/iso8601duration/build/tests)\n\nA small library to handle ISO8601 durations (e.g. `P1Y` for 1 year, `PT2H30M` for 2 hours and 30 minutes) in C#.\n\nSome libraries attempt to parse these durations to `TimeSpan`, but it doesn't really make sense, because `TimeSpan` doesn't have a concept of month, so they just translate `P1M` to 30 days. This is wrong because all months don't have the same number of days; January 1 + 1 month should be February 1, not January 31.\n\nThis library introduces a `Duration` struct with operators to add a duration to or subtract a duration from a date, with the proper semantics. For instance:\n\n```csharp\nvar startDate = new DateTime(2018, 1, 1);\nvar duration = Duration.Parse(\"P2M\");\nvar endDate = startDate + duration; // 2018/03/01\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomaslevesque%2Fiso8601durationhelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomaslevesque%2Fiso8601durationhelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomaslevesque%2Fiso8601durationhelper/lists"}