"January has thirty-one days."
Translation:Januaro havas tridek unu tagojn.
Not entirely wrong, but really strange. That would mean that January is a container that has 31 days in it. A weird way of looking at a month. Come to think if if "Januaro havas 31 tagojn" is also a bit weird, but that's how one says it. This would be more logical: "Januaro konsistas el 31 tagoj." = "January consists of 31 days". It's human language. Always a compromise between strict logic and human thinking...
I figured that "enhavas" would work since we often say "There are 31 days in January," but that makes sense. It could be an English thing, but that was my way of thinking.
The sentence you (Bertilow) said in Esperanto would actually be: Januaro estas ujo, ke havas tridek unu tagojn en ĝi. Enhavi means contains as in the general sense of having something or has in it. So Januaro enhavas 31 tagojn, could be January (the subject) contains 31 days. Hope that helps and I hope I didn't sound mean! :)