-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathlocale.ts
38 lines (35 loc) · 870 Bytes
/
locale.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Alias } from "./misc";
export type LocaleCode = string & Alias;
export interface Locale {
name: string;
code: LocaleCode;
thousandsSeparator?: string;
decimalSeparator: string;
weekStart: number; //1 = Monday, 7 = Sunday
dateFormat: string;
timeFormat: string;
formulaArgSeparator: string;
}
export const DEFAULT_LOCALES: Locale[] = [
{
name: "English (US)",
code: "en_US",
thousandsSeparator: ",",
decimalSeparator: ".",
weekStart: 7, // Sunday
dateFormat: "m/d/yyyy",
timeFormat: "hh:mm:ss a",
formulaArgSeparator: ",",
},
{
name: "French",
code: "fr_FR",
thousandsSeparator: " ",
decimalSeparator: ",",
weekStart: 1, // Monday
dateFormat: "dd/mm/yyyy",
timeFormat: "hh:mm:ss",
formulaArgSeparator: ";",
},
];
export const DEFAULT_LOCALE: Locale = DEFAULT_LOCALES[0];