/** * Returns the first date that is visible in the grid. This should always * be in the month preceding the month of the selected date. * * @return the date. */ private Calendar getFirstVisibleDate() { final Calendar c = Calendar.getInstance(); c.set(this.chosenDate.get(Calendar.YEAR), this.chosenDate.get( Calendar.MONTH), 1); c.add(Calendar.DATE, -1); while (c.get(Calendar.DAY_OF_WEEK) != getFirstDayOfWeek()) { c.add(Calendar.DATE, -1); } return c; }
/** * Returns the first date that is visible in the grid. This should always * be in the month preceding the month of the selected date. * * @return the date. */ private Calendar getFirstVisibleDate() { final Calendar c = Calendar.getInstance(); c.set(this.chosenDate.get(Calendar.YEAR), this.chosenDate.get( Calendar.MONTH), 1); c.add(Calendar.DATE, -1); while (c.get(Calendar.DAY_OF_WEEK) != getFirstDayOfWeek()) { c.add(Calendar.DATE, -1); } return c; }
/** * Returns the first date that is visible in the grid. This should always * be in the month preceding the month of the selected date. * * @return the date. */ private Calendar getFirstVisibleDate() { final Calendar c = Calendar.getInstance(); c.set(this.chosenDate.get(Calendar.YEAR), this.chosenDate.get( Calendar.MONTH), 1); c.add(Calendar.DATE, -1); while (c.get(Calendar.DAY_OF_WEEK) != getFirstDayOfWeek()) { c.add(Calendar.DATE, -1); } return c; }