From 8ba59b4cfad70ff264d0db3c88b3a766b1246f65 Mon Sep 17 00:00:00 2001 From: Chip Kent Date: Wed, 10 Jan 2024 11:56:48 -0700 Subject: [PATCH] Addressed reviewer comments. --- .../time/calendar/TestBusinessCalendar.java | 16 ++++++++-------- .../io/deephaven/time/calendar/TestCalendar.java | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/engine/time/src/test/java/io/deephaven/time/calendar/TestBusinessCalendar.java b/engine/time/src/test/java/io/deephaven/time/calendar/TestBusinessCalendar.java index fe468645157..7fd3041cfa9 100644 --- a/engine/time/src/test/java/io/deephaven/time/calendar/TestBusinessCalendar.java +++ b/engine/time/src/test/java/io/deephaven/time/calendar/TestBusinessCalendar.java @@ -1503,33 +1503,33 @@ public void testMinusNonBusinessDays() { } public void testFutureBusinessDate() { - assertEquals(bCalendar.plusBusinessDays(DateTimeUtils.todayLocalDate(bCalendar.timeZone()), 3), + assertEquals(bCalendar.plusBusinessDays(bCalendar.calendarDate(), 3), bCalendar.futureBusinessDate(3)); - assertEquals(bCalendar.plusBusinessDays(DateTimeUtils.todayLocalDate(bCalendar.timeZone()), -3), + assertEquals(bCalendar.plusBusinessDays(bCalendar.calendarDate(), -3), bCalendar.futureBusinessDate(-3)); assertNull(bCalendar.futureBusinessDate(NULL_INT)); } public void testPastBusinessDate() { - assertEquals(bCalendar.minusBusinessDays(DateTimeUtils.todayLocalDate(bCalendar.timeZone()), 3), + assertEquals(bCalendar.minusBusinessDays(bCalendar.calendarDate(), 3), bCalendar.pastBusinessDate(3)); - assertEquals(bCalendar.minusBusinessDays(DateTimeUtils.todayLocalDate(bCalendar.timeZone()), -3), + assertEquals(bCalendar.minusBusinessDays(bCalendar.calendarDate(), -3), bCalendar.pastBusinessDate(-3)); assertNull(bCalendar.pastBusinessDate(NULL_INT)); } public void testFutureNonBusinessDate() { - assertEquals(bCalendar.plusNonBusinessDays(DateTimeUtils.todayLocalDate(bCalendar.timeZone()), 3), + assertEquals(bCalendar.plusNonBusinessDays(bCalendar.calendarDate(), 3), bCalendar.futureNonBusinessDate(3)); - assertEquals(bCalendar.plusNonBusinessDays(DateTimeUtils.todayLocalDate(bCalendar.timeZone()), -3), + assertEquals(bCalendar.plusNonBusinessDays(bCalendar.calendarDate(), -3), bCalendar.futureNonBusinessDate(-3)); assertNull(bCalendar.futureNonBusinessDate(NULL_INT)); } public void testPastNonBusinessDate() { - assertEquals(bCalendar.minusNonBusinessDays(DateTimeUtils.todayLocalDate(bCalendar.timeZone()), 3), + assertEquals(bCalendar.minusNonBusinessDays(bCalendar.calendarDate(), 3), bCalendar.pastNonBusinessDate(3)); - assertEquals(bCalendar.minusNonBusinessDays(DateTimeUtils.todayLocalDate(bCalendar.timeZone()), -3), + assertEquals(bCalendar.minusNonBusinessDays(bCalendar.calendarDate(), -3), bCalendar.pastNonBusinessDate(-3)); assertNull(bCalendar.pastNonBusinessDate(NULL_INT)); } diff --git a/engine/time/src/test/java/io/deephaven/time/calendar/TestCalendar.java b/engine/time/src/test/java/io/deephaven/time/calendar/TestCalendar.java index d461cfcc29a..4fbf1c76ee4 100644 --- a/engine/time/src/test/java/io/deephaven/time/calendar/TestCalendar.java +++ b/engine/time/src/test/java/io/deephaven/time/calendar/TestCalendar.java @@ -159,18 +159,18 @@ public void testMinusDays() { } public void testCurrentDate() { - assertEquals(DateTimeUtils.todayLocalDate(calendar.timeZone()), calendar.calendarDate()); + assertEquals(calendar.calendarDate(), calendar.calendarDate()); } public void testFutureDate() { - assertEquals(calendar.plusDays(DateTimeUtils.todayLocalDate(calendar.timeZone()), 3), calendar.futureDate(3)); - assertEquals(calendar.plusDays(DateTimeUtils.todayLocalDate(calendar.timeZone()), -3), calendar.futureDate(-3)); + assertEquals(calendar.plusDays(calendar.calendarDate(), 3), calendar.futureDate(3)); + assertEquals(calendar.plusDays(calendar.calendarDate(), -3), calendar.futureDate(-3)); assertNull(calendar.futureDate(NULL_INT)); } public void testPastDate() { - assertEquals(calendar.minusDays(DateTimeUtils.todayLocalDate(calendar.timeZone()), 3), calendar.pastDate(3)); - assertEquals(calendar.minusDays(DateTimeUtils.todayLocalDate(calendar.timeZone()), -3), calendar.pastDate(-3)); + assertEquals(calendar.minusDays(calendar.calendarDate(), 3), calendar.pastDate(3)); + assertEquals(calendar.minusDays(calendar.calendarDate(), -3), calendar.pastDate(-3)); assertNull(calendar.pastDate(NULL_INT)); }