hasSome() not working with Date object

@avinashmurthy Hi there, multiple values do not need to be in an array. You can have an array of a single item.
Here is what I think you’re looking for and I think it is what @anthonyb was getting at… two objects are never equal when compared. This includes Date objects. When you’re using hasSome(), you are checking if one or more of the object(s) in the array equal some other value (in this case a Date object). This will always return false… unless you are comparing (as anthony mentioned) the ms of the Date object by calling getTime().
You could consider storing the date as a Number instead of a Date object – when you insert a tuple into the collection, just store the returned value of getTime()… that way you can use hasSome() as you have here.
When you retrieve the tuple and you want the Number back into a Date object, just construct a new Date(integerInMS).

Hope that helps :slight_smile: