Misc half fixes

This commit is contained in:
2024-12-21 11:00:13 -05:00
parent bf2d0f0711
commit c6467087c1
3 changed files with 129 additions and 22 deletions

View File

@@ -153,7 +153,10 @@ export class TimeManager {
getDateRange(period) {
const now = this.getNow();
switch (period) {
// Normalize period to handle both 'last' and 'previous' prefixes
const normalizedPeriod = period.startsWith('previous') ? period.replace('previous', 'last') : period;
switch (normalizedPeriod) {
case 'custom': {
// Custom ranges are handled separately via getCustomRange
console.warn('[TimeManager] Custom ranges should use getCustomRange method');