public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; } }
private Recurrence findMatchingRecurrence(long instant) { int standardOffset = iStandardOffset; Recurrence startRecurrence = iStartRecurrence; Recurrence endRecurrence = iEndRecurrence; long start, end; try { start = startRecurrence.next (instant, standardOffset, endRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. start = instant; } catch (ArithmeticException e) { // Overflowed. start = instant; } try { end = endRecurrence.next (instant, standardOffset, startRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. end = instant; } catch (ArithmeticException e) { // Overflowed. end = instant; } return (start > end) ? startRecurrence : endRecurrence; } }
public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; } }
public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; } }
public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; } }
private Recurrence findMatchingRecurrence(long instant) { int standardOffset = iStandardOffset; Recurrence startRecurrence = iStartRecurrence; Recurrence endRecurrence = iEndRecurrence; long start, end; try { start = startRecurrence.next (instant, standardOffset, endRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. start = instant; } catch (ArithmeticException e) { // Overflowed. start = instant; } try { end = endRecurrence.next (instant, standardOffset, startRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. end = instant; } catch (ArithmeticException e) { // Overflowed. end = instant; } return (start > end) ? startRecurrence : endRecurrence; } }
private Recurrence findMatchingRecurrence(long instant) { int standardOffset = iStandardOffset; Recurrence startRecurrence = iStartRecurrence; Recurrence endRecurrence = iEndRecurrence; long start, end; try { start = startRecurrence.next (instant, standardOffset, endRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. start = instant; } catch (ArithmeticException e) { // Overflowed. start = instant; } try { end = endRecurrence.next (instant, standardOffset, startRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. end = instant; } catch (ArithmeticException e) { // Overflowed. end = instant; } return (start > end) ? startRecurrence : endRecurrence; } }
public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; } }
private Recurrence findMatchingRecurrence(long instant) { int standardOffset = iStandardOffset; Recurrence startRecurrence = iStartRecurrence; Recurrence endRecurrence = iEndRecurrence; long start, end; try { start = startRecurrence.next (instant, standardOffset, endRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. start = instant; } catch (ArithmeticException e) { // Overflowed. start = instant; } try { end = endRecurrence.next (instant, standardOffset, startRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. end = instant; } catch (ArithmeticException e) { // Overflowed. end = instant; } return (start > end) ? startRecurrence : endRecurrence; } }
private Recurrence findMatchingRecurrence(long instant) { int standardOffset = iStandardOffset; Recurrence startRecurrence = iStartRecurrence; Recurrence endRecurrence = iEndRecurrence; long start, end; try { start = startRecurrence.next (instant, standardOffset, endRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. start = instant; } catch (ArithmeticException e) { // Overflowed. start = instant; } try { end = endRecurrence.next (instant, standardOffset, startRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. end = instant; } catch (ArithmeticException e) { // Overflowed. end = instant; } return (start > end) ? startRecurrence : endRecurrence; } }
public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; }
private Recurrence findMatchingRecurrence(long instant) { int standardOffset = iStandardOffset; Recurrence startRecurrence = iStartRecurrence; Recurrence endRecurrence = iEndRecurrence; long start, end; try { start = startRecurrence.next (instant, standardOffset, endRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. start = instant; } catch (ArithmeticException e) { // Overflowed. start = instant; } try { end = endRecurrence.next (instant, standardOffset, startRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. end = instant; } catch (ArithmeticException e) { // Overflowed. end = instant; } return (start > end) ? startRecurrence : endRecurrence; } }
public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; } }
public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; }
private Recurrence findMatchingRecurrence(long instant) { int standardOffset = iStandardOffset; Recurrence startRecurrence = iStartRecurrence; Recurrence endRecurrence = iEndRecurrence; long start, end; try { start = startRecurrence.next (instant, standardOffset, endRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. start = instant; } catch (ArithmeticException e) { // Overflowed. start = instant; } try { end = endRecurrence.next (instant, standardOffset, startRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. end = instant; } catch (ArithmeticException e) { // Overflowed. end = instant; } return (start > end) ? startRecurrence : endRecurrence; } }
private Recurrence findMatchingRecurrence(long instant) { int standardOffset = iStandardOffset; Recurrence startRecurrence = iStartRecurrence; Recurrence endRecurrence = iEndRecurrence; long start, end; try { start = startRecurrence.next (instant, standardOffset, endRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. start = instant; } catch (ArithmeticException e) { // Overflowed. start = instant; } try { end = endRecurrence.next (instant, standardOffset, startRecurrence.getSaveMillis()); } catch (IllegalArgumentException e) { // Overflowed. end = instant; } catch (ArithmeticException e) { // Overflowed. end = instant; } return (start > end) ? startRecurrence : endRecurrence; } }
public long next(final long instant, int standardOffset, int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); final int wallOffset = standardOffset + saveMillis; long testInstant = instant; int year; if (instant == Long.MIN_VALUE) { year = Integer.MIN_VALUE; } else { year = chrono.year().get(instant + wallOffset); } if (year < iFromYear) { // First advance instant to start of from year. testInstant = chrono.year().set(0, iFromYear) - wallOffset; // Back off one millisecond to account for next recurrence // being exactly at the beginning of the year. testInstant -= 1; } long next = iRecurrence.next(testInstant, standardOffset, saveMillis); if (next > instant) { year = chrono.year().get(next + wallOffset); if (year > iToYear) { // Out of range, return original value. next = instant; } } return next; }