MCPcopy Index your code
hub / github.com/simstudioai/sim / getEndDateFromTimeRange

Function getEndDateFromTimeRange

apps/sim/lib/logs/filters.ts:109–123  ·  view source on GitHub ↗
(timeRange: TimeRange, endDate?: string)

Source from the content-addressed store, hash-verified

107 * @returns Date object for the end of the range, or null for preset ranges
108 */
109export function getEndDateFromTimeRange(timeRange: TimeRange, endDate?: string): Date | null {
110 if (timeRange !== 'Custom range') return null
111
112 if (endDate) {
113 const date = new Date(endDate)
114 if (!endDate.includes('T')) {
115 date.setHours(23, 59, 59, 999)
116 } else {
117 date.setMilliseconds(999)
118 }
119 return date
120 }
121
122 return null
123}
124
125type ComparisonOperator = '=' | '>' | '<' | '>=' | '<=' | '!='
126

Callers 3

LogsFunction · 0.90
applyFilterParamsFunction · 0.90
AuditLogsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected