Skip to content

Commit f3c502b

Browse files
committed
Add process overloads using LocalDate and LocalDateTime
1 parent 8881142 commit f3c502b

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

src/main/java/dev/erichaag/develocity/processing/BuildProcessorBuilder.java

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717

1818
import java.time.Duration;
1919
import java.time.Instant;
20+
import java.time.LocalDate;
21+
import java.time.LocalDateTime;
2022
import java.time.OffsetDateTime;
23+
import java.time.ZoneId;
2124
import java.time.ZonedDateTime;
2225
import java.util.ArrayList;
2326
import java.util.List;
@@ -383,6 +386,52 @@ public BuildProcessor process(OffsetDateTime since, String query) {
383386
return process(since.toInstant(), query);
384387
}
385388

389+
/**
390+
* Builds and starts the {@link BuildProcessor}, processing builds since the
391+
* given date at the beginning of the day using the system default timezone.
392+
*
393+
* @param since the date and time from which to start processing builds
394+
* @return the built {@link BuildProcessor}
395+
*/
396+
public BuildProcessor process(LocalDate since) {
397+
return process(since, null);
398+
}
399+
400+
/**
401+
* Builds and starts the {@link BuildProcessor}, processing builds since the
402+
* given date at the beginning of the day using the system default timezone.
403+
*
404+
* @param since the date and time from which to start processing builds
405+
* @param query a query string to filter builds
406+
* @return the built {@link BuildProcessor}
407+
*/
408+
public BuildProcessor process(LocalDate since, String query) {
409+
return process(since.atStartOfDay(ZoneId.systemDefault()), query);
410+
}
411+
412+
/**
413+
* Builds and starts the {@link BuildProcessor}, processing builds since the
414+
* given date and time using the system's default timezone.
415+
*
416+
* @param since the date and time from which to start processing builds
417+
* @return the built {@link BuildProcessor}
418+
*/
419+
public BuildProcessor process(LocalDateTime since) {
420+
return process(since, null);
421+
}
422+
423+
/**
424+
* Builds and starts the {@link BuildProcessor}, processing builds since the
425+
* given date and time using the system's default timezone.
426+
*
427+
* @param since the date and time from which to start processing builds
428+
* @param query a query string to filter builds
429+
* @return the built {@link BuildProcessor}
430+
*/
431+
public BuildProcessor process(LocalDateTime since, String query) {
432+
return process(since.atZone(ZoneId.systemDefault()), query);
433+
}
434+
386435
/**
387436
* Builds and starts the {@link BuildProcessor}, processing builds from now
388437
* since the provided duration. For example, passing

0 commit comments

Comments
 (0)