constrainDateToRange() — supabase Function Reference
Architecture documentation for the constrainDateToRange() function in PITR.utils.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 468b023f_4258_890a_dfca_70911b34ad14["constrainDateToRange()"] 326db367_c0df_96cd_0aa5_37f6692822cb["PITRForm()"] 326db367_c0df_96cd_0aa5_37f6692822cb -->|calls| 468b023f_4258_890a_dfca_70911b34ad14 style 468b023f_4258_890a_dfca_70911b34ad14 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/Database/Backups/PITR/PITR.utils.ts lines 43–51
export function constrainDateToRange(current: dayjs.Dayjs, lower: dayjs.Dayjs, upper: dayjs.Dayjs) {
if (current.isBefore(lower)) {
return lower
}
if (current.isAfter(upper)) {
return upper
}
return current
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does constrainDateToRange() do?
constrainDateToRange() is a function in the supabase codebase.
What calls constrainDateToRange()?
constrainDateToRange() is called by 1 function(s): PITRForm.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free