code: 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;
    }
  }
docs: checks if the start is equal to or before the end