MCPcopy Index your code
hub / github.com/TanStack/db / evaluateStrftime

Function evaluateStrftime

packages/db/src/query/compiler/evaluators.ts:47–57  ·  view source on GitHub ↗
(format: string, date: Date)

Source from the content-addressed store, hash-verified

45}
46
47function evaluateStrftime(format: string, date: Date): string {
48 if (format === `%Y-%m-%d`) {
49 return date.toISOString().slice(0, 10)
50 }
51
52 if (format === `%Y-%m-%dT%H:%M:%fZ`) {
53 return date.toISOString()
54 }
55
56 return date.toISOString()
57}
58
59/**
60 * Converts a 3-valued logic result to a boolean for use in WHERE/HAVING filters.

Callers 1

compileFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected