tanclary commented on code in PR #3611:
URL: https://github.com/apache/calcite/pull/3611#discussion_r1444111999
##########
core/src/main/java/org/apache/calcite/util/format/FormatElementEnum.java:
##########
@@ -54,6 +61,12 @@ public enum FormatElementEnum implements FormatElement {
sb.append(work.eeeeFormat.format(date));
}
},
+ day("eeee", "The full lower case day name") {
+ @Override public void format(StringBuilder sb, Date date) {
Review Comment:
can we not just use the method above this one and make it lowercase?
##########
core/src/test/java/org/apache/calcite/util/format/FormatElementEnumTest.java:
##########
@@ -35,6 +35,14 @@ class FormatElementEnumTest {
assertThat(ts, hasToString("Tuesday"));
}
+ @Test void testday() {
+ final String date = "2014-09-30T10:00:00Z";
+ StringBuilder ts = new StringBuilder();
+ FormatElementEnum.day.format(ts, Date.from(Instant.parse(date)));
+ assertThat(ts, hasToString("tuesday"));
+ }
+
+
Review Comment:
remove one of the newlines
##########
core/src/test/java/org/apache/calcite/util/format/FormatElementEnumTest.java:
##########
@@ -62,6 +70,12 @@ class FormatElementEnumTest {
FormatElementEnum.DY.format(ts, Date.from(Instant.parse(date)));
assertThat(ts, hasToString("Tue"));
}
Review Comment:
Needs newline above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]