Skip to content

Dates

An instance of the forvendi.BreezzApi.BreezzDates class (accessible via forvendi.BreezzApi.DATES) provides helper methods for date range calculations and overlap validation.


validateDateRangesOverlap(newList, oldList, dateRangeComparator)

Validates overlaps between two lists of custom DateRange objects using a custom comparator.

Signature:

public List<DateRangeOverlapValidator.DateRange> validateDateRangesOverlap(
    DateRangeOverlapValidator.DateRange[] newList,
    DateRangeOverlapValidator.DateRange[] oldList,
    DateRangeOverlapValidator.DateRangeComparator dateRangeComparator
)

Parameters:

  • newList: Collection of new DateRange records to be validated.
  • oldList: Collection of existing DateRange records.
  • dateRangeComparator: Custom date range comparator implementation.

Return Value: List<DateRangeOverlapValidator.DateRange> – List of overlapping date range records.


validateDateRangesOverlap(newList, oldList)

Validates overlaps between two lists of custom DateRange objects using default comparison rules.

Signature:

public List<DateRangeOverlapValidator.DateRange> validateDateRangesOverlap(
    DateRangeOverlapValidator.DateRange[] newList,
    DateRangeOverlapValidator.DateRange[] oldList
)

Parameters:

  • newList: Collection of new DateRange records to be validated.
  • oldList: Collection of existing DateRange records.

Return Value: List<DateRangeOverlapValidator.DateRange> – List of overlapping date range records.


validateDateRangesOverlap(newList, oldList, startDateField, endDateField, dateRangeComparator)

Validates date overlaps between two lists of SObject records using specified start/end date fields and a custom comparator.

Signature:

public List<DateRangeOverlapValidator.DateRange> validateDateRangesOverlap(
    SObject[] newList,
    SObject[] oldList,
    SObjectField startDateField,
    SObjectField endDateField,
    DateRangeOverlapValidator.DateRangeComparator dateRangeComparator
)

Parameters:

  • newList: Collection of new SObject records to be validated.
  • oldList: Collection of existing SObject records.
  • startDateField: SObjectField specifying the range start date.
  • endDateField: SObjectField specifying the range end date.
  • dateRangeComparator: Custom date range comparator implementation.

Return Value: List<DateRangeOverlapValidator.DateRange> – List of overlapping date range records.


validateDateRangesOverlap(newList, oldList, startDateField, endDateField)

Validates date overlaps between two lists of SObject records using specified start and end date fields.

Signature:

public List<DateRangeOverlapValidator.DateRange> validateDateRangesOverlap(
    SObject[] newList,
    SObject[] oldList,
    SObjectField startDateField,
    SObjectField endDateField
)

Parameters:

  • newList: Collection of new SObject records to be validated.
  • oldList: Collection of existing SObject records.
  • startDateField: SObjectField specifying the range start date.
  • endDateField: SObjectField specifying the range end date.

Return Value: List<DateRangeOverlapValidator.DateRange> – List of overlapping date range records.