https://github.com/mrwilson/java-working-days
🌍 🗓️ A small library to calculate working days between dates for multiple countries
https://github.com/mrwilson/java-working-days
dates java minimal working-days
Last synced: 3 months ago
JSON representation
🌍 🗓️ A small library to calculate working days between dates for multiple countries
- Host: GitHub
- URL: https://github.com/mrwilson/java-working-days
- Owner: mrwilson
- Created: 2019-08-30T19:44:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-21T06:08:33.000Z (almost 5 years ago)
- Last Synced: 2024-04-16T07:08:23.512Z (about 2 years ago)
- Topics: dates, java, minimal, working-days
- Language: Java
- Homepage:
- Size: 117 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# java-working-days
[](https://travis-ci.org/mrwilson/java-working-days)
[](https://github.com/google/google-java-format/)
> What date is N working days after date X?
**Under Development - [Caveat Emptor](https://en.wikipedia.org/wiki/Caveat_emptor)**
## Examples
The `java-working-days` library exposes three methods as partial inverses to each-other.
```java
import static uk.co.probablyfine.time.calendars.HolidayCalendar.ENGLAND_AND_WALES;
WorkingDays workingDays = WorkingDays.usingCalendar(ENGLAND_AND_WALES);
workingDays.daysAfter(LocalDate.of(2019, 1, 1), 10);
// LocalDate[2019, 1, 16]
workingDays.daysBefore(LocalDate.of(2019, 1, 16), 10)
// LocalDate[2019, 1, 1]
workingDays.daysBetween(LocalDate.of(2019, 1, 16), LocalDate.of(2019, 1, 1))
// 10
```
## Supported Calendars
- [x] England & Wales
- [x] United States
- [ ] Scotland
- [ ] Northern Ireland
- [ ] France