fc.util
Class CalendarUtil

java.lang.Object
  extended by fc.util.CalendarUtil

public class CalendarUtil
extends Object


Constructor Summary
CalendarUtil()
           
 
Method Summary
static void setMonth(Calendar cal, int monthNum)
          Sets the month in the specified calendar based on the specified 0-based month number.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarUtil

public CalendarUtil()
Method Detail

setMonth

public static final void setMonth(Calendar cal,
                                  int monthNum)
Sets the month in the specified calendar based on the specified 0-based month number. There is no direct setMonth method in Calendar. Therefore, this method is essentially, this method is a giant switch statement, like:
  case 0: 
          cal.set(Calendar.MONTH, Calendar.JANUARY); 
          break;
  case 1: 
          cal.set(Calendar.MONTH, Calendar.FEBRUARY); 
          break;
  ... etc...