github-actions[bot] commented on code in PR #41602:
URL: https://github.com/apache/beam/pull/41602#discussion_r4672989433


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/CalendarWindows.java:
##########
@@ -341,7 +352,14 @@ public IntervalWindow assignWindow(Instant timestamp) {
 
       DateTime offsetStart = 
startDate.withMonthOfYear(monthOfYear).withDayOfMonth(dayOfMonth);
 
-      int yearOffset = Years.yearsBetween(offsetStart, datetime).getYears() / 
number * number;
+      int years = Years.yearsBetween(offsetStart, datetime).getYears();
+      // yearsBetween rounds toward zero. Round down instead, so that a 
timestamp before the start
+      // is

Review Comment:
   **🟢 Low**: Minor formatting nit: this comment has an awkward line wrap with 
`// is` on its own line (unlike the identical comment in `MonthsWindows` 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]

Reply via email to