svn commit: r1857382 - /ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1857382 - /ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java

lektran
Author: lektran
Date: Fri Apr 12 08:54:27 2019
New Revision: 1857382

URL: http://svn.apache.org/viewvc?rev=1857382&view=rev
Log:
Fixed: Bug in TemporalExpression MinuteRange and HourRange that can cause a day
or month to be skipped when using next() (OFBIZ-10875)

Modified:
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java?rev=1857382&r1=1857381&r2=1857382&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/TemporalExpressions.java Fri Apr 12 08:54:27 2019
@@ -961,6 +961,9 @@ public class TemporalExpressions impleme
             }
             if (cal.get(Calendar.DAY_OF_MONTH) != next.get(Calendar.DAY_OF_MONTH)) {
                 context.dayBumped = true;
+                if (cal.get(Calendar.MONTH) != next.get(Calendar.MONTH)) {
+                    context.monthBumped = true;
+                }
             }
             return next;
         }
@@ -1243,6 +1246,12 @@ public class TemporalExpressions impleme
             }
             if (cal.get(Calendar.HOUR_OF_DAY) != next.get(Calendar.HOUR_OF_DAY)) {
                 context.hourBumped = true;
+                if (cal.get(Calendar.DAY_OF_MONTH) != next.get(Calendar.DAY_OF_MONTH)) {
+                    context.dayBumped = true;
+                    if (cal.get(Calendar.MONTH) != next.get(Calendar.MONTH)) {
+                        context.monthBumped = true;
+                    }
+                }
             }
             return next;
         }