BusinessDateTime extends AbstractDateTime implements ReadableDateTime, Serializable { public BusinessDateTime minusSeconds(int seconds) { if (seconds == 0) { return this; } else { return move(-seconds, Constants.NANOS_PER_SECOND); } } BusinessDateTime(DateTime dateTime,
                          LocalTime dayStartTime,
                          LocalTime dayEndTime,
                          Set<LocalDate> holidays,
                          WorkingWeek workingWeek);  BusinessDateTime(DateTime dateTime,
                          LocalTime dayStartTime,
                          LocalTime dayEndTime,
                          Set<LocalDate> holidays);  BusinessDateTime(LocalTime dayStartTime, LocalTime dayEndTime, Set<LocalDate> holidays);  BusinessDateTime(DateTime dateTime, Set<LocalDate> holidays);  BusinessDateTime(Set<LocalDate> holidays);  BusinessDateTime(DateTime dateTime, LocalTime dayStartTime, LocalTime dayEndTime);  BusinessDateTime(LocalTime dayStartTime, LocalTime dayEndTime);  BusinessDateTime(DateTime dateTime);  BusinessDateTime(); Chronology getChronology(); long getMillis(); BusinessDateTime plusMillis(int millis); BusinessDateTime minusMillis(int millis); BusinessDateTime plusSeconds(int seconds); BusinessDateTime minusSeconds(int seconds); BusinessDateTime plusMinutes(int minutes); BusinessDateTime minusMinutes(int minutes); BusinessDateTime plusHours(int hours); BusinessDateTime minusHours(int hours); BusinessDateTime plusDays(int days); BusinessDateTime minusDays(int days); BusinessDateTime plusWeeks(int weeks); BusinessDateTime minusWeeks(int weeks); BusinessDateTime plusMonths(int months); BusinessDateTime minusMonths(int months); BusinessDateTime plusYears(int years); BusinessDateTime minusYears(int years); BusinessDateTime withEra(int era); BusinessDateTime withCenturyOfEra(int centuryOfEra); BusinessDateTime withYearOfEra(int yearOfEra); BusinessDateTime withYearOfCentury(int yearOfCentury); BusinessDateTime withYear(int year); BusinessDateTime withWeekyear(int weekYear); BusinessDateTime withMonthOfYear(int monthOfYear); BusinessDateTime withWeekOfWeekyear(int weekOfWeekYear); BusinessDateTime withDayOfYear(int dayOfYear); BusinessDateTime withDayOfMonth(int dayOfMonth); BusinessDateTime withDayOfWeek(int dayOfWeek); BusinessDateTime withHourOfDay(int hour); BusinessDateTime withMinuteOfHour(int minute); BusinessDateTime withSecondOfMinute(int second); BusinessDateTime withMillisOfSecond(int millis); BusinessDateTime withMillisOfDay(int millis); BusinessDateTime withBusinessDayStartTime(LocalTime time); BusinessDateTime withBusinessDayEndTime(LocalTime time); BusinessDateTime withHolidays(Set<LocalDate> dates); BusinessDateTime withWorkingWeek(WorkingWeek week);  }
@Test public void minusSeconds_3Seconds_3SecondsBefore() { DateTime start = new DateTime(2014, 12, 11, 12, 0, 3, 0); DateTime expected = new DateTime(2014, 12, 11, 12, 0, 0, 0); BusinessDateTime businessStart = new BusinessDateTime(start); assertEquals("Thursday 12:00:03.0 minus 3 Seconds should return Thursday 12:00:00.0", expected, businessStart.minusSeconds(3).toDateTime()); }
@Test public void minusSeconds_3SecondsBeginOfDay_3SecondsBeforePreviousDay() { DateTime start = new DateTime(2014, 12, 12, 9, 0, 2, 0); DateTime expected = new DateTime(2014, 12, 11, 16, 59, 59, 0); BusinessDateTime businessStart = new BusinessDateTime(start); assertEquals("Friday 9:00:02.0 minus 3 Seconds should return Thursday 16:59:59.0", expected, businessStart.minusSeconds(3).toDateTime()); }
@Test public void minusSeconds_3Seconds3SecondsAfterStartOfDay_StartOfDay() { DateTime start = new DateTime(2014, 12, 12, 9, 0, 3, 0); DateTime expected = new DateTime(2014, 12, 12, 9, 0, 0, 0); BusinessDateTime businessStart = new BusinessDateTime(start); assertEquals("Friday 9:00:03.0 minus 3 Seconds should return Friday 9:00:00.0", expected, businessStart.minusSeconds(3).toDateTime()); }