/** * Gets the minimum value of the specified field for the current date. For * the gregorian calendar, this value is the same as * {@code getMinimum()}. * * @param field * the field. * @return the minimum value of the specified field. */ @Override public int getActualMinimum(int field) { return getMinimum(field); }
/** * Gets the minimum value of the specified field for the current date. For * the gregorian calendar, this value is the same as * {@code getMinimum()}. * * @param field * the field. * @return the minimum value of the specified field. */ @Override public int getActualMinimum(int field) { return getMinimum(field); }
/** * Gets the minimum value of the specified field for the current date. For * the gregorian calendar, this value is the same as * {@code getMinimum()}. * * @param field the field. * @return the minimum value of the specified field. */ @Override public int getActualMinimum(int field) { return getMinimum(field); }
/** * Gets the minimum value of the specified field for the current date. For * the gregorian calendar, this value is the same as * {@code getMinimum()}. * * @param field * the field. * @return the minimum value of the specified field. */ @Override public int getActualMinimum(int field) { return getMinimum(field); }
/** * Gets the minimum value of the specified field for the current date. For * the gregorian calendar, this value is the same as * {@code getMinimum()}. * * @param field * the field. * @return the minimum value of the specified field. */ @Override public int getActualMinimum(int field) { return getMinimum(field); }
/** * Gets the minimum value of the specified field for the current date. For * the gregorian calendar, this value is the same as * {@code getMinimum()}. * * @param field * the field. * @return the minimum value of the specified field. */ @Override public int getActualMinimum(int field) { return getMinimum(field); }
/** * Gets the minimum value of the specified field for the current date. For * the gregorian calendar, this value is the same as * {@code getMinimum()}. * * @param field * the field. * @return the minimum value of the specified field. */ @Override public int getActualMinimum(int field) { return getMinimum(field); }
/** * Gets the minimum value of the specified field for the current date. For * the gregorian calendar, this value is the same as * {@code getMinimum()}. * * @param field * the field. * @return the minimum value of the specified field. */ @Override public int getActualMinimum(int field) { return getMinimum(field); }
/** * Creates new DatePicker component. */ public DatePicker() { initComponents(); GregorianCalendar cal = new GregorianCalendar(); int minDay = cal.getMinimum(Calendar.DAY_OF_MONTH); int maxDay = cal.getMaximum(Calendar.DAY_OF_MONTH); int minMonth = cal.getMinimum(Calendar.MONTH); int maxMonth = cal.getMaximum(Calendar.MONTH); List<Integer> days = new ArrayList<Integer>(); List<Integer> months = new ArrayList<Integer>(); for (int i = minDay; i <= maxDay; i++) { days.add(i); } for (int i = minMonth; i <= maxMonth; i++) { months.add(i + 1); } dayComboBox.setModel(new javax.swing.DefaultComboBoxModel(days.toArray())); monthComboBox.setModel(new javax.swing.DefaultComboBoxModel(months.toArray())); jLabel1.setText("Day:"); jLabel2.setText("Month:"); jLabel3.setText("Year:"); }
/** * Creates new DatePicker component. */ public DatePicker() { initComponents(); GregorianCalendar cal = new GregorianCalendar(); int minDay = cal.getMinimum(Calendar.DAY_OF_MONTH); int maxDay = cal.getMaximum(Calendar.DAY_OF_MONTH); int minMonth = cal.getMinimum(Calendar.MONTH); int maxMonth = cal.getMaximum(Calendar.MONTH); List<Integer> days = new ArrayList<Integer>(); List<Integer> months = new ArrayList<Integer>(); for (int i = minDay; i <= maxDay; i++) { days.add(i); } for (int i = minMonth; i <= maxMonth; i++) { months.add(i + 1); } dayComboBox.setModel(new javax.swing.DefaultComboBoxModel(days.toArray())); monthComboBox.setModel(new javax.swing.DefaultComboBoxModel(months.toArray())); jLabel1.setText("Day:"); jLabel2.setText("Month:"); jLabel3.setText("Year:"); }
public GregorianCalendar getCalendar() { int tz = hasTimezone() ? getTimezoneInMinutes() * 60000 : 0; TimeZone zone = new SimpleTimeZone(tz, "LLL"); GregorianCalendar calendar = new GregorianCalendar(zone); calendar.setGregorianChange(new Date(Long.MIN_VALUE)); if (tz < calendar.getMinimum(Calendar.ZONE_OFFSET) || tz > calendar.getMaximum(Calendar.ZONE_OFFSET)) { return adjustTimezone(0).getCalendar(); } calendar.clear(); calendar.setLenient(false); int yr = year; if (year <= 0) { yr = hasNoYearZero ? 1 - year : 0 - year; calendar.set(Calendar.ERA, GregorianCalendar.BC); } //noinspection MagicConstant calendar.set(yr, month - 1, day); calendar.set(Calendar.ZONE_OFFSET, tz); calendar.set(Calendar.DST_OFFSET, 0); calendar.getTime(); return calendar; }
public GregorianCalendar getCalendar() { int tz = hasTimezone() ? getTimezoneInMinutes() * 60000 : 0; TimeZone zone = new SimpleTimeZone(tz, "LLL"); GregorianCalendar calendar = new GregorianCalendar(zone); calendar.setGregorianChange(new Date(Long.MIN_VALUE)); if (tz < calendar.getMinimum(Calendar.ZONE_OFFSET) || tz > calendar.getMaximum(Calendar.ZONE_OFFSET)) { return adjustTimezone(0).getCalendar(); } calendar.clear(); calendar.setLenient(false); int yr = year; if (year <= 0) { yr = hasNoYearZero ? 1 - year : 0 - year; calendar.set(Calendar.ERA, GregorianCalendar.BC); } //noinspection MagicConstant calendar.set(yr, month - 1, day); calendar.set(Calendar.ZONE_OFFSET, tz); calendar.set(Calendar.DST_OFFSET, 0); calendar.getTime(); return calendar; }