We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9eee10 commit 25367bbCopy full SHA for 25367bb
server/src/internalClusterTest/java/org/opensearch/search/query/BooleanQueryIT.java
@@ -159,7 +159,16 @@ public void testMustNotDateRangeWithFormatAndTimeZoneRewrite() throws Exception
159
);
160
}
161
162
+ private String padZeros(int value, int length) {
163
+ // String.format() not allowed
164
+ String ret = Integer.toString(value);
165
+ if (ret.length() < length) {
166
+ ret = "0".repeat(length - ret.length()) + ret;
167
+ }
168
+ return ret;
169
170
+
171
private String getDate(int day, int hour) {
- return "2016-01-" + String.format("%02d", day) + "T" + String.format("%02d", hour) + ":00:00.000";
172
+ return "2016-01-" + padZeros(day, 2) + "T" + padZeros(hour, 2) + ":00:00.000";
173
174
0 commit comments