( startDate: string | null, endDate: string | null )
| 319 | } |
| 320 | |
| 321 | export function getDefaultIntervalByDates( |
| 322 | startDate: string | null, |
| 323 | endDate: string | null |
| 324 | ): null | keyof typeof intervals { |
| 325 | if (startDate && endDate) { |
| 326 | if (isSameDay(startDate, endDate)) { |
| 327 | return 'hour'; |
| 328 | } |
| 329 | const days = differenceInDays(endDate, startDate); |
| 330 | if (days <= 92) { |
| 331 | return 'day'; |
| 332 | } |
| 333 | if (days <= 186) { |
| 334 | return 'week'; |
| 335 | } |
| 336 | return 'month'; |
| 337 | } |
| 338 | |
| 339 | return null; |
| 340 | } |
| 341 | |
| 342 | export const countries = { |
| 343 | AF: 'Afghanistan', |
no outgoing calls
no test coverage detected