@meshmakers/shared-ui 3.3.470 → 3.3.480
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3521,32 +3521,34 @@ const DEFAULT_TIME_RANGE_LABELS = {
|
|
|
3521
3521
|
*/
|
|
3522
3522
|
class TimeRangeUtils {
|
|
3523
3523
|
/**
|
|
3524
|
-
* Calculate time range for a specific year
|
|
3524
|
+
* Calculate time range for a specific year.
|
|
3525
|
+
* Uses exclusive end boundary (start of next year) for correct LESS_THAN filtering.
|
|
3525
3526
|
*/
|
|
3526
3527
|
static getYearRange(year) {
|
|
3527
3528
|
return {
|
|
3528
3529
|
from: new Date(year, 0, 1, 0, 0, 0, 0),
|
|
3529
|
-
to: new Date(year,
|
|
3530
|
+
to: new Date(year + 1, 0, 1, 0, 0, 0, 0)
|
|
3530
3531
|
};
|
|
3531
3532
|
}
|
|
3532
3533
|
/**
|
|
3533
|
-
* Calculate time range for a specific quarter
|
|
3534
|
+
* Calculate time range for a specific quarter.
|
|
3535
|
+
* Uses exclusive end boundary (start of next quarter) for correct LESS_THAN filtering.
|
|
3534
3536
|
*/
|
|
3535
3537
|
static getQuarterRange(year, quarter) {
|
|
3536
3538
|
const startMonth = (quarter - 1) * 3;
|
|
3537
|
-
const endMonth = startMonth + 2;
|
|
3538
3539
|
return {
|
|
3539
3540
|
from: new Date(year, startMonth, 1, 0, 0, 0, 0),
|
|
3540
|
-
to: new Date(year,
|
|
3541
|
+
to: new Date(year, startMonth + 3, 1, 0, 0, 0, 0)
|
|
3541
3542
|
};
|
|
3542
3543
|
}
|
|
3543
3544
|
/**
|
|
3544
|
-
* Calculate time range for a specific month
|
|
3545
|
+
* Calculate time range for a specific month.
|
|
3546
|
+
* Uses exclusive end boundary (start of next month) for correct LESS_THAN filtering.
|
|
3545
3547
|
*/
|
|
3546
3548
|
static getMonthRange(year, month) {
|
|
3547
3549
|
return {
|
|
3548
3550
|
from: new Date(year, month, 1, 0, 0, 0, 0),
|
|
3549
|
-
to: new Date(year, month + 1,
|
|
3551
|
+
to: new Date(year, month + 1, 1, 0, 0, 0, 0)
|
|
3550
3552
|
};
|
|
3551
3553
|
}
|
|
3552
3554
|
/**
|