Bug: Week of Year set on sql code doesn't correctly resolve dates.
When setting year and then weekOfYear, the results reset to a prior year on years where first week of year starts in the previous calendar year. This is probably a joda bug.
`import org.joda.time.DateTimeField import org.joda.time.DateTimeFieldType import org.joda.time.DateTimeZone import org.joda.time.MutableDateTime
MutableDateTime mutableDateTime1 = new MutableDateTime(0, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC) mutableDateTime1.set(DateTimeFieldType.year(), 2021) mutableDateTime1.set(DateTimeFieldType.weekOfWeekyear(), 49) mutableDateTime1.setDayOfWeek(1) println(mutableDateTime1.toString())
MutableDateTime mutableDateTime2 = new MutableDateTime(0, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC) mutableDateTime2.set(DateTimeFieldType.weekOfWeekyear(), 49) mutableDateTime2.set(DateTimeFieldType.year(), 2021) mutableDateTime2.setDayOfWeek(1) println(mutableDateTime2.toString()) `
2020-11-30T00:00:00.000Z 2021-12-06T00:00:00.000Z