Package net.jqwik.time.api
Class Dates
- java.lang.Object
-
- net.jqwik.time.api.Dates
-
@API(status=EXPERIMENTAL, since="1.4.0") public class Dates extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LocalDateArbitrary
dates()
Create an arbitrary that generates instances of LocalDate.static CalendarArbitrary
datesAsCalendar()
Create an arbitrary that generates instances of Calendar.static DateArbitrary
datesAsDate()
Create an arbitrary that generates instances of Date.static Arbitrary<java.lang.Integer>
daysOfMonth()
Create an arbitrary that generates days of month as Integer.static Arbitrary<java.time.DayOfWeek>
daysOfWeek()
Create an arbitrary that generates instances of DayOfWeek.static MonthDayArbitrary
monthDays()
Create an arbitrary that generates instances of MonthDay.static Arbitrary<java.time.Month>
months()
Create an arbitrary that generates instances of Month.static PeriodArbitrary
periods()
Create an arbitrary that generates instances of Period.static YearMonthArbitrary
yearMonths()
Create an arbitrary that generates instances of YearMonth.static YearArbitrary
years()
Create an arbitrary that generates instances of Year.
-
-
-
Method Detail
-
dates
public static LocalDateArbitrary dates()
Create an arbitrary that generates instances of LocalDate. All generated dates use the Gregorian Calendar, even if they are before October 15, 1582. By default, local dates with years between 1900 and 2500 are generated.- Returns:
- a new arbitrary instance
-
datesAsCalendar
public static CalendarArbitrary datesAsCalendar()
Create an arbitrary that generates instances of Calendar.- Returns:
- a new arbitrary instance
-
datesAsDate
public static DateArbitrary datesAsDate()
Create an arbitrary that generates instances of Date.- Returns:
- a new arbitrary instance
-
years
public static YearArbitrary years()
Create an arbitrary that generates instances of Year.- Returns:
- a new arbitrary instance
-
months
public static Arbitrary<java.time.Month> months()
Create an arbitrary that generates instances of Month.- Returns:
- a new arbitrary instance
-
daysOfWeek
public static Arbitrary<java.time.DayOfWeek> daysOfWeek()
Create an arbitrary that generates instances of DayOfWeek.- Returns:
- a new arbitrary instance
-
daysOfMonth
public static Arbitrary<java.lang.Integer> daysOfMonth()
Create an arbitrary that generates days of month as Integer.- Returns:
- a new arbitrary instance
-
yearMonths
public static YearMonthArbitrary yearMonths()
Create an arbitrary that generates instances of YearMonth.- Returns:
- a new arbitrary instance
-
monthDays
public static MonthDayArbitrary monthDays()
Create an arbitrary that generates instances of MonthDay.- Returns:
- a new arbitrary instance
-
periods
public static PeriodArbitrary periods()
Create an arbitrary that generates instances of Period.By default a period will be between -1000 and 1000 years
- Returns:
- a new arbitrary instance
-
-