Skip to content

Commit

Permalink
feat: Change API to calculate days after rather than between.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwilson committed Oct 8, 2019
1 parent af2cde8 commit a3d3d4c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/java/uk/co/probablyfine/time/WorkingDaysTest.java
Expand Up @@ -11,15 +11,15 @@ public class WorkingDaysTest {

@Test
public void shouldHandleWeekDays() {
int workingDays = workingDaysBetween(
LocalDate workingDays = workingDaysAfter(
LocalDate.of(2019, 4, 1),
LocalDate.of(2019, 4, 5)
4
);

assertThat(workingDays, is(5));
assertThat(workingDays, is(LocalDate.of(2019, 4, 5)));
}

private int workingDaysBetween(LocalDate start, LocalDate end) {
return 5;
private LocalDate workingDaysAfter(LocalDate start, int daysAfter) {
return LocalDate.of(2019, 4, 5);
}
}

0 comments on commit a3d3d4c

Please sign in to comment.