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

Function toIsoDate

apps/sim/lib/blog/utils.ts:12–15  ·  view source on GitHub ↗
(value: Date | string | number)

Source from the content-addressed store, hash-verified

10}
11
12export function toIsoDate(value: Date | string | number): string {
13 if (value instanceof Date) return value.toISOString()
14 return new Date(value).toISOString()
15}
16
17export function byDateDesc<T extends { date: string }>(a: T, b: T) {
18 return new Date(b.date).getTime() - new Date(a.date).getTime()

Callers 2

scanFrontmattersFunction · 0.90
getPostBySlugFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected