public boolean isSameSession(Calendar time1, Calendar time2) { if (nonStopSession) return true; TimeInterval interval1 = theMostRecentIntervalBefore(time1); if (!interval1.isContainingTime(time1)) { return false; } TimeInterval interval2 = theMostRecentIntervalBefore(time2); return interval2.isContainingTime(time2) && interval1.equals(interval2); }
@Override public boolean isSameSession(Calendar time1, Calendar time2) { if (isNonStopSession()) return true; TimeInterval interval1 = theMostRecentIntervalBefore(time1); if (!interval1.isContainingTime(time1)) { return false; } TimeInterval interval2 = theMostRecentIntervalBefore(time2); return interval2.isContainingTime(time2) && interval1.equals(interval2); }
public String toString() { StringBuilder buf = new StringBuilder(); SimpleDateFormat dowFormat = new SimpleDateFormat("EEEE"); dowFormat.setTimeZone(TimeZone.getTimeZone("UTC")); SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss-z"); timeFormat.setTimeZone(TimeZone.getTimeZone("UTC")); TimeInterval ti = theMostRecentIntervalBefore(SystemTime.getUtcCalendar()); formatTimeInterval(buf, ti, timeFormat, false); // Now the localized equivalents, if necessary if (!startTime.getTimeZone().equals(SystemTime.UTC_TIMEZONE) || !endTime.getTimeZone().equals(SystemTime.UTC_TIMEZONE)) { buf.append(" ("); formatTimeInterval(buf, ti, timeFormat, true); buf.append(")"); } return buf.toString(); }
@Override public boolean isSameSession(Calendar time1, Calendar time2) { if (isNonStopSession()) return true; TimeInterval interval1 = theMostRecentIntervalBefore(time1); if (!interval1.isContainingTime(time1)) { return false; } TimeInterval interval2 = theMostRecentIntervalBefore(time2); return interval2.isContainingTime(time2) && interval1.equals(interval2); }
public boolean isSessionTime() { if(nonStopSession) { return true; } Calendar now = SystemTime.getUtcCalendar(); TimeInterval interval = theMostRecentIntervalBefore(now); return interval.isContainingTime(now); }
public String toString() { StringBuilder buf = new StringBuilder(); SimpleDateFormat dowFormat = new SimpleDateFormat("EEEE"); dowFormat.setTimeZone(TimeZone.getTimeZone("UTC")); SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss-z"); timeFormat.setTimeZone(TimeZone.getTimeZone("UTC")); TimeInterval ti = theMostRecentIntervalBefore(SystemTime.getUtcCalendar()); formatTimeInterval(buf, ti, timeFormat, false); // Now the localized equivalents, if necessary if (!startTime.getTimeZone().equals(SystemTime.UTC_TIMEZONE) || !endTime.getTimeZone().equals(SystemTime.UTC_TIMEZONE)) { buf.append(" ("); formatTimeInterval(buf, ti, timeFormat, true); buf.append(")"); } return buf.toString(); }
public String toString() { StringBuilder buf = new StringBuilder(); SimpleDateFormat dowFormat = new SimpleDateFormat("EEEE"); dowFormat.setTimeZone(TimeZone.getTimeZone("UTC")); SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss-z"); timeFormat.setTimeZone(TimeZone.getTimeZone("UTC")); TimeInterval ti = theMostRecentIntervalBefore(SystemTime.getUtcCalendar()); formatTimeInterval(buf, ti, timeFormat, false); // Now the localized equivalents, if necessary if (!startTime.getTimeZone().equals(SystemTime.UTC_TIMEZONE) || !endTime.getTimeZone().equals(SystemTime.UTC_TIMEZONE)) { buf.append(" ("); formatTimeInterval(buf, ti, timeFormat, true); buf.append(")"); } return buf.toString(); }
@Override public boolean isSessionTime() { if(isNonStopSession()) { return true; } Calendar now = SystemTime.getUtcCalendar(); TimeInterval interval = theMostRecentIntervalBefore(now); return interval.isContainingTime(now); }
@Override public boolean isSessionTime() { if(isNonStopSession()) { return true; } Calendar now = SystemTime.getUtcCalendar(); TimeInterval interval = theMostRecentIntervalBefore(now); return interval.isContainingTime(now); }