MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getLocale

Function getLocale

apps/start/src/utils/date.ts:11–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9}
10
11export function getLocale() {
12 if (typeof navigator === 'undefined') {
13 return 'en-US';
14 }
15
16 return navigator.language ?? 'en-US';
17}
18
19export function formatDate(date: Date) {
20 const day = date.getDate();

Callers 4

formatDateFunction · 0.85
formatDateTimeFunction · 0.85
formatTimeFunction · 0.85
date.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected