isContainedBy method

bool isContainedBy(
  1. EllaDate start,
  2. EllaDate end
)

Get whether is contained by two dates.

  • Start must be chronologically before end.

Implementation

bool isContainedBy(EllaDate start, EllaDate end)
{
  DateTime dateTime = toDateTime();
  return (
    ( this == start || start.toDateTime().isBefore(dateTime) ) &&
    ( this == end || end.toDateTime().isAfter(dateTime) )
  );
}