Towid Khan wrote:but if you are getting the data from an outside source, where the convention ( i believe no one think of January as 0th Month on top of their head as oppose to being "1st" month). is "1st" Month is January, there is no way to know the Mapping between constant and Month.
it is not always the case that you are getting Calendar.JANUARY as a parameter. so it is definitely a room for improvement for this class.
Using the "outside source" argument to say its the core library's fault is... well, what happens if the outside source sends a
string "JAN", using a latin font, in EBCDIC, etc. It is your program that has to parse the "outside source" to the format that is document by the library.
Henry