java-working-days

A small library to calculate working days between dates for multiple countries

License

License

MIT
Categories

Categories

Java Languages
GroupId

GroupId

uk.co.probablyfine
ArtifactId

ArtifactId

java-working-days
Last Version

Last Version

0.2.2
Release Date

Release Date

Type

Type

jar
Description

Description

java-working-days
A small library to calculate working days between dates for multiple countries
Project URL

Project URL

https://github.com/mrwilson/java-working-days
Source Code Management

Source Code Management

https://github.com/mrwilson/java-working-days

Download java-working-days

How to add to project

<!-- https://jarcasting.com/artifacts/uk.co.probablyfine/java-working-days/ -->
<dependency>
    <groupId>uk.co.probablyfine</groupId>
    <artifactId>java-working-days</artifactId>
    <version>0.2.2</version>
</dependency>
// https://jarcasting.com/artifacts/uk.co.probablyfine/java-working-days/
implementation 'uk.co.probablyfine:java-working-days:0.2.2'
// https://jarcasting.com/artifacts/uk.co.probablyfine/java-working-days/
implementation ("uk.co.probablyfine:java-working-days:0.2.2")
'uk.co.probablyfine:java-working-days:jar:0.2.2'
<dependency org="uk.co.probablyfine" name="java-working-days" rev="0.2.2">
  <artifact name="java-working-days" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.co.probablyfine', module='java-working-days', version='0.2.2')
)
libraryDependencies += "uk.co.probablyfine" % "java-working-days" % "0.2.2"
[uk.co.probablyfine/java-working-days "0.2.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

java-working-days

Build Status Code style: google-1.7

What date is N working days after date X?

Under Development - Caveat Emptor

Examples

The java-working-days library exposes three methods as partial inverses to each-other.

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

  • England & Wales
  • United States
  • Scotland
  • Northern Ireland
  • France

Versions

Version
0.2.2
0.2.0