(date: Date)
| 254 | |
| 255 | // Helper function to get the start of the week (Monday) for a given date |
| 256 | const getWeekStart = (date: Date): Date => { |
| 257 | const d = new Date(date); |
| 258 | const day = d.getDay(); |
| 259 | const diff = d.getDate() - day + (day === 0 ? -6 : 1); // Adjust to Monday |
| 260 | d.setDate(diff); |
| 261 | d.setHours(0, 0, 0, 0); // Normalize to start of day |
| 262 | return d; |
| 263 | }; |
| 264 | |
| 265 | // Helper function to compare dates based on interval |
| 266 | const shouldContinue = ( |
no outgoing calls
no test coverage detected