rorueda commented on code in PR #3653:
URL: https://github.com/apache/calcite/pull/3653#discussion_r1467644396


##########
core/src/main/java/org/apache/calcite/util/format/FormatElementEnum.java:
##########
@@ -48,7 +48,8 @@ public enum FormatElementEnum implements FormatElement {
       sb.append(String.format(Locale.ROOT, "%2d", calendar.get(Calendar.YEAR) 
/ 100 + 1));
     }
   },
-  D("F", "The weekday (Monday as the first day of the week) as a decimal 
number (1-7)") {
+  // TODO: Parsing of weekdays with sunday as first day of the week

Review Comment:
   I don't think we can. I'm not that familiar with the codebase, but my 
understanding is that the parsing uses java's DateFormat class that that simply 
doesn't have a pattern for the weekday with Sunday as first day of the week. 
   
   There are other TODOs related to parsing in this class, and I think to make 
it all work a more broad/complex change is needed, mainly because in some cases 
not only the pattern is important when parsing, but also the calendar.
   
   Note that I only removed the "F" because it is not the pattern for weekday. 
I know the best would be to fix it all, but I think it's better to point out 
it's not implemented yet than to have an implementation that gives us the wrong 
result.



-- 
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]

Reply via email to