-
-
Notifications
You must be signed in to change notification settings - Fork 517
/
Copy pathi18n.ts
83 lines (80 loc) · 1.8 KB
/
i18n.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// =============================================================================
// i18n
// =============================================================================
export interface Language {
dayNames: string[]
monthNames: string[]
tokens: {
[k: string]: RegExp
}
}
const ENGLISH: Language = {
dayNames: [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
],
monthNames: [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
],
tokens: {
SKIP: /^[ \r\n\t]+|^\.$/,
number: /^[1-9][0-9]*/,
numberAsText: /^(one|two|three)/i,
every: /^every/i,
'day(s)': /^days?/i,
'weekday(s)': /^weekdays?/i,
'week(s)': /^weeks?/i,
'hour(s)': /^hours?/i,
'minute(s)': /^minutes?/i,
'month(s)': /^months?/i,
'year(s)': /^years?/i,
on: /^(on|in)/i,
at: /^(at)/i,
the: /^the/i,
first: /^first/i,
second: /^second/i,
third: /^third/i,
nth: /^([1-9][0-9]*)(\.|th|nd|rd|st)/i,
last: /^last/i,
for: /^for/i,
'time(s)': /^times?/i,
until: /^(un)?til/i,
monday: /^mo(n(day)?)?/i,
tuesday: /^tu(e(s(day)?)?)?/i,
wednesday: /^we(d(n(esday)?)?)?/i,
thursday: /^th(u(r(sday)?)?)?/i,
friday: /^fr(i(day)?)?/i,
saturday: /^sa(t(urday)?)?/i,
sunday: /^su(n(day)?)?/i,
january: /^jan(uary)?/i,
february: /^feb(ruary)?/i,
march: /^mar(ch)?/i,
april: /^apr(il)?/i,
may: /^may/i,
june: /^june?/i,
july: /^july?/i,
august: /^aug(ust)?/i,
september: /^sep(t(ember)?)?/i,
october: /^oct(ober)?/i,
november: /^nov(ember)?/i,
december: /^dec(ember)?/i,
comma: /^(,\s*|(and|or)\s*)+/i,
},
}
export default ENGLISH