{"id":13415095,"url":"https://github.com/joaomatossilva/DateTimeExtensions","last_synced_at":"2025-03-14T22:32:45.802Z","repository":{"id":37271599,"uuid":"2247604","full_name":"joaomatossilva/DateTimeExtensions","owner":"joaomatossilva","description":"This project is a merge of several common DateTime operations on the form of  extensions to System.DateTime, including natural date difference text (precise and human rounded), holidays and working days calculations on several culture locales.","archived":false,"fork":false,"pushed_at":"2024-10-29T09:12:52.000Z","size":23639,"stargazers_count":770,"open_issues_count":8,"forks_count":344,"subscribers_count":45,"default_branch":"master","last_synced_at":"2024-10-29T11:02:04.872Z","etag":null,"topics":["datetime","good-first-issue"],"latest_commit_sha":null,"homepage":"http://datetimeextensions.azurewebsites.net/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaomatossilva.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"joaomatossilva","patreon":"joaomatossilva"}},"created_at":"2011-08-22T09:17:24.000Z","updated_at":"2024-10-29T09:12:06.000Z","dependencies_parsed_at":"2024-11-11T18:35:16.649Z","dependency_job_id":null,"html_url":"https://github.com/joaomatossilva/DateTimeExtensions","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomatossilva%2FDateTimeExtensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomatossilva%2FDateTimeExtensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomatossilva%2FDateTimeExtensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaomatossilva%2FDateTimeExtensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaomatossilva","download_url":"https://codeload.github.com/joaomatossilva/DateTimeExtensions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658057,"owners_count":20326459,"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":["datetime","good-first-issue"],"created_at":"2024-07-30T21:00:43.208Z","updated_at":"2025-03-14T22:32:45.796Z","avatar_url":"https://github.com/joaomatossilva.png","language":"C#","readme":"\u003cdiv align=\"center\"\u003e\n\n# DateTimeExtensions\n\n![DateTimeExtensions Logo](https://github.com/joaomatossilva/DateTimeExtensions/raw/master/assets/datetimeextensions-200-logo.png)\n\n[![NuGet Version](http://img.shields.io/nuget/v/DateTimeExtensions.svg?style=flat)](https://www.nuget.org/packages/DateTimeExtensions/) \n[![MyGet Pre Release](https://img.shields.io/myget/datetimeextensions/vpre/DateTimeExtensions.svg)](https://www.myget.org/feed/datetimeextensions/package/nuget/DateTimeExtensions)\n[![GitHub contributors](https://img.shields.io/github/contributors/joaomatossilva/datetimeextensions.svg)](https://github.com/joaomatossilva/DateTimeExtensions)\n\n\u003c/div\u003e\n\n## 📅 What is DateTimeExtensions?\n\nDateTimeExtensions is a powerful C# library that extends the functionality of `System.DateTime` and `System.DateTimeOffset`. It provides useful methods for working with dates and times, making your code more expressive and easier to read.\n\n## ✨ Key Features\n\n1. **Working Days Calculations**: Easily add or subtract working days, considering regional holidays.\n2. **Holiday Support**: Includes holiday definitions for multiple cultures and regions.\n3. **Natural Language Date Differences**: Get the difference between dates in human-readable format.\n4. **Time of Day Operations**: Simplify time-based comparisons and checks.\n5. **Calendar Export**: Export holidays to common calendar formats.\n6. **SourceLink Support**: Enables debugging into the source code.\n\n## 📦 Installation\n\nInstall DateTimeExtensions via [NuGet](https://learn.microsoft.com/en-us/nuget/reference/nuget-exe-cli-reference?tabs=windows):\n\n```\nInstall-Package DateTimeExtensions\n```\n\n## 🚀 Quick Start\n\nHere are some examples of what you can do with DateTimeExtensions:\n\n```csharp\nusing DateTimeExtensions;\n\n// Add 5 working days to a date\nDateTime futureDate = DateTime.Now.AddWorkingDays(5);\n\n// Check if a date is a working day\nbool isWorkingDay = DateTime.Now.IsWorkingDay();\n\n// Get the difference between dates in natural language\nstring dateDiff = DateTime.Now.ToNaturalText(DateTime.Now.AddDays(45));\n\n// Check if a time is between two other times\nbool isBetween = DateTime.Now.IsBetween(new Time(\"09:00\"), new Time(\"17:00\"));\n```\n\n## 🌍 Supported Cultures\n\nDateTimeExtensions supports working day and holiday calculations for many cultures, including:\n\n- United States (en-US)\n- United Kingdom (en-GB)\n- France (fr-FR)\n- Germany (de-DE)\n- Spain (es-ES)\n- Brazil (pt-BR)\n- Portugal (pt-PT)\n- and many more!\n\nDon't see your culture? Contributions are welcome!\n\n## 🔧 Advanced Features\n\n### Exporting Holidays\n\nYou can export holidays to various calendar formats:\n\n```csharp\nvar exporter = ExportHolidayFormatLocator.LocateByType(ExportType.OfficeHolidays);\nexporter.Export(new WorkingDayCultureInfo(\"en-US\"), 2024, textWriter);\n```\n\n### Custom Working Day Definitions\n\nImplement `IWorkingDayCultureInfo` to define custom working day rules for your specific needs.\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how you can help:\n\n1. Fork the repository\n2. Create a feature branch\n3. Implement your feature or bug fix\n4. Add or update tests as necessary\n5. Submit a pull request\n\nTo add new holiday definitions, please prefix culture-specific holidays with the country name (e.g., \"USA_IndependenceDay\").\n\n## 📖 Documentation\n\nFor more detailed information, visit our [official documentation](http://www.kspace.pt/DateTimeExtensions/).\n\n## 📃 License\n\nThis project is licensed under the Apache License. See the [LICENSE](LICENSE.md) file for details.\n\n## ❤️ Acknowledgements\n\n- Logo design by @manuelbarbosa\n- Build script assistance by @matkoch using [Nuke](http://www.nuke.build/)\n- Open source license provided by [JetBrains](https://www.jetbrains.com/)\n\n---\n\nDateTimeExtensions: Making date and time operations in C# simpler and more intuitive.\n","funding_links":["https://github.com/sponsors/joaomatossilva","https://patreon.com/joaomatossilva"],"categories":["Datetime","日期","C\\#","Libraries"],"sub_categories":["DateTime"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaomatossilva%2FDateTimeExtensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaomatossilva%2FDateTimeExtensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaomatossilva%2FDateTimeExtensions/lists"}