diff --git a/test/src/org/labkey/test/tests/targetedms/InstrumentSchedulingTest.java b/test/src/org/labkey/test/tests/targetedms/InstrumentSchedulingTest.java index f173a348d..f59935900 100644 --- a/test/src/org/labkey/test/tests/targetedms/InstrumentSchedulingTest.java +++ b/test/src/org/labkey/test/tests/targetedms/InstrumentSchedulingTest.java @@ -134,13 +134,8 @@ public void testSchedule() clickAndWait(Locator.linkWithText(PROJECT_1)); waitAndClickAndWait(Locator.linkWithText("Schedule instrument time")); - String yearMonth = Calendar.getInstance().get(Calendar.YEAR) + "-"; int month = (Calendar.getInstance().get(Calendar.MONTH) + 1); - if (month < 10) - { - yearMonth += yearMonth; - } - yearMonth += month; + String yearMonth = Calendar.getInstance().get(Calendar.YEAR) + "-" + (month < 10 ? "0" + month : "" + month); scheduleInstrument(yearMonth + "-02"); scheduleInstrument(yearMonth + "-03");