/** * Rounds the specified instant to midnight. * * @param instant the milliseconds from 1970-01-01T00:00:00Z to round * @param chronology the chronology to use, not null * @return the updated instant, rounded to midnight */ protected long checkInstant(long instant, Chronology chronology) { return chronology.dayOfMonth().roundFloor(instant); }
/** * Rounds the specified instant to midnight. * * @param instant the milliseconds from 1970-01-01T00:00:00Z to round * @param chronology the chronology to use, not null * @return the updated instant, rounded to midnight */ protected long checkInstant(long instant, Chronology chronology) { return chronology.dayOfMonth().roundFloor(instant); }
private long setDayOfMonth(Chronology chrono, long instant) { if (iDayOfMonth >= 0) { instant = chrono.dayOfMonth().set(instant, iDayOfMonth); } else { instant = chrono.dayOfMonth().set(instant, 1); instant = chrono.monthOfYear().add(instant, 1); instant = chrono.dayOfMonth().add(instant, iDayOfMonth); } return instant; }
private long setDayOfMonth(Chronology chrono, long instant) { if (iDayOfMonth >= 0) { instant = chrono.dayOfMonth().set(instant, iDayOfMonth); } else { instant = chrono.dayOfMonth().set(instant, 1); instant = chrono.monthOfYear().add(instant, 1); instant = chrono.dayOfMonth().add(instant, iDayOfMonth); } return instant; }
/** * Get the day of month property. * <p> * The values for day of month are defined in {@link DateTimeConstants}. * * @return the day of month property */ public Property dayOfMonth() { return new Property(this, getChronology().dayOfMonth()); }
/** * Get the day of month property which provides access to advanced functionality. * * @return the day of month property */ public Property dayOfMonth() { return new Property(this, getChronology().dayOfMonth()); }
/** * Get the day of month property which provides access to advanced functionality. * * @return the day of month property */ public Property dayOfMonth() { return new Property(this, getChronology().dayOfMonth()); }
/** * Get the day of month property which provides access to advanced functionality. * * @return the day of month property */ public Property dayOfMonth() { return new Property(this, getChronology().dayOfMonth()); }
/** * Get the day of month property which provides access to advanced functionality. * * @return the day of month property */ public Property dayOfMonth() { return new Property(this, getChronology().dayOfMonth()); }
/** * Get the day of month property which provides access to advanced functionality. * * @return the day of month property */ public Property dayOfMonth() { return new Property(this, getChronology().dayOfMonth()); }
/** * Get the day of month property which provides access to advanced functionality. * * @return the day of month property */ public Property dayOfMonth() { return new Property(this, getChronology().dayOfMonth()); }
/** * Get the day of month property which provides access to advanced functionality. * * @return the day of month property */ public Property dayOfMonth() { return new Property(this, getChronology().dayOfMonth()); }
/** * Get the day of month field value. * <p> * The values for the day of month are defined in {@link org.joda.time.DateTimeConstants}. * * @return the day of month */ public int getDayOfMonth() { return getChronology().dayOfMonth().get(getLocalMillis()); }
/** * Get the day of month field value. * <p> * The values for the day of month are defined in {@link org.joda.time.DateTimeConstants}. * * @return the day of month */ public int getDayOfMonth() { return getChronology().dayOfMonth().get(getMillis()); }
/** * Get the day of month field value. * <p> * The values for the day of month are defined in {@link org.joda.time.DateTimeConstants}. * * @return the day of month */ public int getDayOfMonth() { return getChronology().dayOfMonth().get(getLocalMillis()); }
/** * Get the day of month field value. * <p> * The values for the day of month are defined in {@link org.joda.time.DateTimeConstants}. * * @return the day of month */ public int getDayOfMonth() { return getChronology().dayOfMonth().get(getMillis()); }
/** * Set the day of the month to the specified value. * * @param dayOfMonth the day of the month * @throws IllegalArgumentException if the value is invalid */ public void setDayOfMonth(final int dayOfMonth) { setMillis(getChronology().dayOfMonth().set(getMillis(), dayOfMonth)); }
/** * Set the day of the month to the specified value. * * @param dayOfMonth the day of the month * @throws IllegalArgumentException if the value is invalid */ public void setDayOfMonth(final int dayOfMonth) { setMillis(getChronology().dayOfMonth().set(getMillis(), dayOfMonth)); }
/** * Convert a datetime from one chronology to another. */ private static long convertByYear(long instant, Chronology from, Chronology to) { return to.getDateTimeMillis (from.year().get(instant), from.monthOfYear().get(instant), from.dayOfMonth().get(instant), from.millisOfDay().get(instant)); }
/** * Convert a datetime from one chronology to another. */ private static long convertByYear(long instant, Chronology from, Chronology to) { return to.getDateTimeMillis (from.year().get(instant), from.monthOfYear().get(instant), from.dayOfMonth().get(instant), from.millisOfDay().get(instant)); }