indexOf
Finds and returns the index of the interval in the collection that contains the specified date.
Return
The index of the interval that contains the specified date, if no such interval exists, it returns a negative number which is the bitwise complement of the index of the next interval that starts after the date, or if no interval starts after the specified date, the bitwise complement of the length of the collection.
Parameters
date
The date to search for.