src/interval.js
function validateStartEnd(start, end) {
  if (!start || !start.isValid) {
    return new Invalid("missing or invalid start");
  } else if (!end || !end.isValid) {
    return new Invalid("missing or invalid end");
  } else if (end < start) {
    return new Invalid(
      "end before start",
      `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`
    );
  } else {
    return null;
  }
}
function validateStartEnd(start, end) {
  if (!start || !start.isValid) {
    return new Invalid("missing or invalid start");
  } else if (!end || !end.isValid) {
    return new Invalid("missing or invalid end");
  } else if (end < start) {
    return new Invalid(
      "end before start",
      `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`
    );
  } else {
    return null;
  }
}
function validateStartEnd ( start , end ) { if ( ! start || ! start . isValid ) { return new Invalid ( "missing or invalid start" ) ; } else if ( ! end || ! end . isValid ) { return new Invalid ( "missing or invalid end" ) ; } else if ( end < start ) { return new Invalid ( "end before start" , ` ${ start . toISO ( ) } ${ end . toISO ( ) } ` ) ; } else { return null ; } }
checks if the start is equal to or before the end
checks if the start is equal to or before the end