Skip to content

Commit

Permalink
feat: add support for LocalDate to LambdaDslObject #1530
Browse files Browse the repository at this point in the history
  • Loading branch information
uglyog committed Jul 26, 2022
1 parent d914ff1 commit ad812c4
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZonedDateTime;
import java.util.Arrays;
import java.util.Date;
Expand Down Expand Up @@ -325,6 +326,18 @@ public LambdaDslObject date(String name, String format, ZonedDateTime example) {
return this;
}

/**
* Attribute that must match the provided date format
*
* @param name attribute date
* @param format date format to match
* @param example example date to use for generated values
*/
public LambdaDslObject date(String name, String format, LocalDate example) {
object.localDate(name, format, example);
return this;
}

/**
* Attribute named 'time' that must be an ISO formatted time
*/
Expand Down

0 comments on commit ad812c4

Please sign in to comment.