Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexandresanlim/brazil-holidays-dot-net
Pacote para auxiliar a identificar feriados no Brasil, incluindo datas móveis e ano bisexto.
https://github.com/alexandresanlim/brazil-holidays-dot-net
brasil brazil csharp dotnet feriados feriados-brasil holiday holidays nuget
Last synced: 4 days ago
JSON representation
Pacote para auxiliar a identificar feriados no Brasil, incluindo datas móveis e ano bisexto.
- Host: GitHub
- URL: https://github.com/alexandresanlim/brazil-holidays-dot-net
- Owner: alexandresanlim
- License: mit
- Created: 2020-10-23T15:43:44.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T12:44:59.000Z (27 days ago)
- Last Synced: 2024-11-13T13:29:05.428Z (7 days ago)
- Topics: brasil, brazil, csharp, dotnet, feriados, feriados-brasil, holiday, holidays, nuget
- Language: C#
- Homepage:
- Size: 52.7 KB
- Stars: 18
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# BrazilHolidays.Net
[![Nuget](https://img.shields.io/nuget/dt/BrazilHolidays.Net)](https://www.nuget.org/packages/BrazilHolidays.Net)
[![Nuget](https://img.shields.io/nuget/v/BrazilHolidays.Net)](https://www.nuget.org/packages/BrazilHolidays.Net)Instale [este pacote](https://www.nuget.org/packages/BrazilHolidays.Net) via nuget ou linha de comando:
```nuget
Install-Package BrazilHolidays.Net
```## Como usar
- Hoje é feriado? (Is today a holiday?)
```csharp
BrazilHolidays.Net.Today.IsHoliday();
```- Uma data especifica é feriado? (Is a specific date a holiday?)
```csharp
new DateTime(2020, 12, 25).IsHoliday()
```- Lista dos próximos feriados (Get a list of next holidays)
```csharp
BrazilHolidays.Net.Holiday.GetAllNext();
```- Pegar o ultimo (Get the last holiday)
```csharp
BrazilHolidays.Net.Holiday.GetOld();
```- Pegar o próximo (Get the next holiday)
```csharp
BrazilHolidays.Net.Holiday.GetNext();
```- Pegar todos de um determinado mês (Get a list by month)
```csharp
BrazilHolidays.Net.Holiday.GetAllByMonth(BrazilHolidays.Net.DataStore.Holiday.Months.Dec);
```### Este projeto incluí testes:
- Feriados para o ano corrente
- Feriados para datas móveis em um ano bissexto e não bissexto.
- Se a data atual é feriado![image](https://user-images.githubusercontent.com/5353685/97025524-9193e600-152e-11eb-9077-f873e472c43f.png)