Originally posted by Henry Wong:
The matches method matches the whole string -- it doesn't do partial matches like "string contains xxx". To do that, either use the find() method, or modify the regex to match around what you are looking for like... string.matches(".*\\w+.*").
Originally posted by Rob Prime:
And Calendar.SUNDAY = 1
It doesn't really matter what value you give them; you could start at 481 if you like. That's what you are naming them for.
I'd start at 1 in this case.