MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / formatDollars

Function formatDollars

apps/web/src/lib/utils.ts:72–79  ·  view source on GitHub ↗
(amount: number)

Source from the content-addressed store, hash-verified

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 */
78export function isDateOnlyString(value: unknown): value is string {
79 return typeof value === 'string' && DATE_ONLY_RE.test(value);
80}
81
82export function formatIsoDateString_UsaDateOnlyFormat(dateString: string | Date | null): string {

Callers 15

validateCustomAmountFunction · 0.90
CreditPurchaseOptionsFunction · 0.90
ProfileExpiringCreditsFunction · 0.90
RenewInfoRowFunction · 0.90
KiloPassBonusRampDialogFunction · 0.90
formatMetricFunction · 0.90
InnerFunction · 0.90
formatKiloPassPriceFunction · 0.90
BonusStreakContentFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected