-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.0.6
-
Component/s: Aggregation Framework
-
Minor Change
-
ALL
-
v4.2, v4.0, v3.6
-
Query 2019-05-06, Query 2019-05-20, Query 2019-06-03, Query 2019-06-17, Query 2019-07-01, Query 2019-07-15
-
31
When using dateFromParts with ISO8601 weeks, the date does not calculate correctly if the isoWeek parameter is less than 1.
Some examples:
'date'*:* { $dateFromParts: { isoWeekYear: 2019, isoWeek: 0 } } gives ** 2019-12-24 'date'*:* { $dateFromParts: { isoWeekYear: 2019, isoWeek: -1 } } gives ** 2019-12-17 'date'*:* { $dateFromParts: { isoWeekYear: 2019, isoWeek: -51 } } gives ** 2019-01-01 'date'*:* { $dateFromParts: { isoWeekYear: 2019, isoWeek: -52 } } gives ** 2018-12-25
- related to
-
SERVER-30523 dateFromParts should not reject "out-of-range" numbers for date/time properties
- Closed
-
SERVER-40573 timelib can read past end of buffer, leads to incorrect time calculations
- Closed