(amount: number)
| 70 | * True when `value` is a bare calendar-date string of the form "YYYY-MM-DD". |
| 71 | * |
| 72 | * Snowflake date-granularity buckets are serialized as date-only strings |
| 73 | * representing a UTC calendar day. `new Date("YYYY-MM-DD")` parses them as |
| 74 | * UTC midnight, so downstream `toLocaleDateString()` would shift the displayed |
| 75 | * day into the viewer's local zone. Callers that render these buckets should |
| 76 | * detect this shape and format with `timeZone: 'UTC'`. |
| 77 | */ |
| 78 | export function isDateOnlyString(value: unknown): value is string { |
| 79 | return typeof value === 'string' && DATE_ONLY_RE.test(value); |
| 80 | } |
| 81 | |
| 82 | export function formatIsoDateString_UsaDateOnlyFormat(dateString: string | Date | null): string { |
no outgoing calls
no test coverage detected