Of course it will give you false
always. You put day numbers to the set with apostrophes. So, your Set
will have items like: '1', '2', '3'
. Whilst String
representation of cDate
has no such apostrophes, so String.valueOf(1)
is not equal "'1'"
. Try to replace this:
set.add("'" + my_date[i][j] + "'");
with this:
set.add(my_date[i][j]);