Set is a well defined collection of distinct objects.
Is the following is a set?
Set of all months having more than 28 days.
I'm confused here. Because on one hand I think that it is well defined because from person to person its meaning is not changed. On the other hand I think that it is not well defined because if we consider a leap year then February is included else not. Note that the year is not specified, I'm you cannot surely say that February is included or not.
Set of eleven best cricketers of the world.
This is not a set because the criteria for best cricketer changes from person to person.
So the set of all months having more than 28 days. Is it really a set?
In order to answer your question, you need to preliminary answer this one: What is the length in days of each month?
It seems to me that the function length on the set of months is not defined (it could serve as an example of something that taking two different values on a point in the domain is not a function).
Let $\cal M$ be the set of months. In order to fix the problem you have, imho, two possibilities.
Either you restrict the question to the subset of $\cal M$ on which length is defined, or you replace $\cal M$ with a bigger set $\cal M^\prime$ endowed with a surjective map $\pi:\cal M^\prime\rightarrow\cal M$ on which the function length can be extended.