Demos and Usage of java.util.GregorianCalendar.getActualMaximum(int field)


   1:   {
   2:     GregorianCalendar cal = new GregorianCalendar();
   3: 
   4:         ...
   5:       System.out.println( (month+1) + " : " +
   6:         cal.getActualMaximum(Calendar.DAY_OF_MONTH) );
   7:     }
   8:   }
   9: }

View Full Code Here
   1: import java.util.Calendar;
   2: import java.util.GregorianCalendar;
   3: 
   4:         ...
   5:                 invoice.getDueDatePeriod().getDf_fm().booleanValue()) {
   6:             GregorianCalendar cal = new GregorianCalendar();
   7:             cal.setTime(invoice.getDueDate());
   8:         ...
   9:             int lastDay = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
  10:             cal.set(Calendar.DAY_OF_MONTH, lastDay);

View Full Code Here
   1: import java.util.Calendar;
   2: import java.util.GregorianCalendar;
   3: import java.util.LinkedList;
   4:         ...
   5:             Calendar endCal = Calendar.getInstance();
   6:             GregorianCalendar monthCal = new GregorianCalendar();
   7:             
   8:         ...
   9:                     
  10:                     monthCal.set(Calendar.DATE, monthCal.getActualMaximum(Calendar.DATE) );
  11:                     Date endDate = new Date(monthCal.getTime().getTime());

View Full Code Here
   1:     protected Calendar calcDate(boolean start, int shift, int shiftUnit, int dayInShiftUnit) {
   2:         GregorianCalendar calendar = new GregorianCalendar();
   3: 
   4:         ...
   5:         else
   6:             calendar.set(dayInShiftUnit, calendar.getActualMaximum(dayInShiftUnit));
   7: 
   8:         if (start) {
   9:             calendar.set(Calendar.HOUR_OF_DAY, 0);

View Full Code Here
   1:     {
   2:         GregorianCalendar cal = new GregorianCalendar();
   3:         cal.setTime(DocDate);
   4:         ...
   5:         cal.set(Calendar.MILLISECOND, 0);
   6:         int maxDayCut = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
   7:             cal.set(Calendar.DAY_OF_MONTH, maxDayCut);
   8:         ...
   9:         cal.add(Calendar.MONTH, FixMonthOffset);
  10:         int maxDay = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
  11:             cal.set(Calendar.DAY_OF_MONTH, maxDay);

View Full Code Here
   1: import java.util.Date;
   2: import java.util.GregorianCalendar;
   3: import javax.swing.FocusManager;
   4:         ...
   5:     private CoolHeader infoLabel;
   6:     private GregorianCalendar calendar;
   7:     private MButton todayButton;
   8:         ...
   9:         setMargin(5);
  10:         calendar = new GregorianCalendar();
  11:         
  12:         ...
  13:         DayButton dayButton;
  14:         int max = calendar.getActualMaximum(DAY_OF_MONTH);

View Full Code Here
   1: import java.util.Date;
   2: import java.util.GregorianCalendar;
   3: import java.util.HashMap;
   4:         ...
   5:         
   6:         GregorianCalendar cal = new GregorianCalendar( year_, month_, 1 );
   7:         cal.add(Calendar.MONTH, pageIndex);
   8:         ...
   9:             
  10:             int mlen = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
  11:             

View Full Code Here
   1: 
   2:     private GregorianCalendar    m_calendar;
   3:     private int                 m_firstDay;
   4:         ...
   5:     {
   6:         m_calendar = new GregorianCalendar(Language.getLoginLanguage().getLocale());
   7:         if (startTS == null)
   8:         ...
   9:         int dayOne = m_calendar.get(java.util.Calendar.DAY_OF_WEEK);
  10:         int lastDate = m_calendar.getActualMaximum(java.util.Calendar.DATE);

View Full Code Here
   1: import java.util.Date;
   2: import java.util.GregorianCalendar;
   3: import java.util.Iterator;
   4:         ...
   5:                 {
   6:                     mv_.goTo( new GregorianCalendar(year, month, date));
   7:                     mv_.setView(MultiView.DAY);
   8:         ...
   9: 
  10:             GregorianCalendar cal = new GregorianCalendar();
  11:             int today = -1;
  12:         ...
  13: 
  14:             int ld = cal.getActualMaximum(Calendar.DAY_OF_MONTH);

View Full Code Here
   1: import java.util.Date;
   2: import java.util.GregorianCalendar;
   3: import java.util.Iterator;
   4:         ...
   5:             
   6:             GregorianCalendar cal = new GregorianCalendar();
   7:             int today = -1;
   8:         ...
   9:             
  10:             int ld = cal.getActualMaximum( Calendar.DAY_OF_MONTH );
  11:             

View Full Code Here