{"id":20511920,"url":"https://github.com/markwhitaker/monthdiff","last_synced_at":"2025-08-11T21:04:58.186Z","repository":{"id":88345844,"uuid":"88357558","full_name":"markwhitaker/MonthDiff","owner":"markwhitaker","description":"Simple C# extension methods to calculate the difference in months between two dates","archived":false,"fork":false,"pushed_at":"2025-02-17T19:39:06.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-05T22:44:45.031Z","etag":null,"topics":["c-sharp","datetime","datetimeoffset","extension-methods","months"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"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/markwhitaker.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":"2017-04-15T15:54:33.000Z","updated_at":"2025-02-17T19:39:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"29b162c3-c415-4b6d-9a6f-049771f42232","html_url":"https://github.com/markwhitaker/MonthDiff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markwhitaker/MonthDiff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwhitaker%2FMonthDiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwhitaker%2FMonthDiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwhitaker%2FMonthDiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwhitaker%2FMonthDiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markwhitaker","download_url":"https://codeload.github.com/markwhitaker/MonthDiff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwhitaker%2FMonthDiff/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269956177,"owners_count":24503116,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c-sharp","datetime","datetimeoffset","extension-methods","months"],"created_at":"2024-11-15T20:38:30.877Z","updated_at":"2025-08-11T21:04:58.141Z","avatar_url":"https://github.com/markwhitaker.png","language":"C#","readme":"# MonthDiff\n\nA very simple pair of extension methods on `DateTime` and `DateTimeOffset` to calculate the difference in months between two dates.\n\nI wanted it to work exactly like a `TotalMonths` property on `TimeSpan` would work, i.e. return the count of complete months between two dates, ignoring any partial months. Because it's based on `DateTime.AddMonths()` it respects different month lengths and returns what a human would understand as a period of months. Unfortunately it can't be implemented as an extension method on `TimeSpan` because that doesn't retain knowledge of the actual dates used, and for months they're important.\n\nOriginally posted at [StackOverflow](http://stackoverflow.com/questions/1525990/calculating-the-difference-in-months-between-two-dates/25136172#25136172).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwhitaker%2Fmonthdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkwhitaker%2Fmonthdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwhitaker%2Fmonthdiff/lists"}