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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var formatDistanceLocale = {
lessThanXSeconds: {
standalone: {
one: 'vähem kui üks sekund',
other: 'vähem kui {{count}} sekundit'
},
withPreposition: {
one: 'vähem kui ühe sekundi',
other: 'vähem kui {{count}} sekundi'
}
},
xSeconds: {
standalone: {
one: 'üks sekund',
other: '{{count}} sekundit'
},
withPreposition: {
one: 'ühe sekundi',
other: '{{count}} sekundi'
}
},
halfAMinute: {
standalone: 'pool minutit',
withPreposition: 'poole minuti'
},
lessThanXMinutes: {
standalone: {
one: 'vähem kui üks minut',
other: 'vähem kui {{count}} minutit'
},
withPreposition: {
one: 'vähem kui ühe minuti',
other: 'vähem kui {{count}} minuti'
}
},
xMinutes: {
standalone: {
one: 'üks minut',
other: '{{count}} minutit'
},
withPreposition: {
one: 'ühe minuti',
other: '{{count}} minuti'
}
},
aboutXHours: {
standalone: {
one: 'umbes üks tund',
other: 'umbes {{count}} tundi'
},
withPreposition: {
one: 'umbes ühe tunni',
other: 'umbes {{count}} tunni'
}
},
xHours: {
standalone: {
one: 'üks tund',
other: '{{count}} tundi'
},
withPreposition: {
one: 'ühe tunni',
other: '{{count}} tunni'
}
},
xDays: {
standalone: {
one: 'üks päev',
other: '{{count}} päeva'
},
withPreposition: {
one: 'ühe päeva',
other: '{{count}} päeva'
}
},
aboutXWeeks: {
standalone: {
one: 'umbes üks nädal',
other: 'umbes {{count}} nädalat'
},
withPreposition: {
one: 'umbes ühe nädala',
other: 'umbes {{count}} nädala'
}
},
xWeeks: {
standalone: {
one: 'üks nädal',
other: '{{count}} nädalat'
},
withPreposition: {
one: 'ühe nädala',
other: '{{count}} nädala'
}
},
aboutXMonths: {
standalone: {
one: 'umbes üks kuu',
other: 'umbes {{count}} kuud'
},
withPreposition: {
one: 'umbes ühe kuu',
other: 'umbes {{count}} kuu'
}
},
xMonths: {
standalone: {
one: 'üks kuu',
other: '{{count}} kuud'
},
withPreposition: {
one: 'ühe kuu',
other: '{{count}} kuu'
}
},
aboutXYears: {
standalone: {
one: 'umbes üks aasta',
other: 'umbes {{count}} aastat'
},
withPreposition: {
one: 'umbes ühe aasta',
other: 'umbes {{count}} aasta'
}
},
xYears: {
standalone: {
one: 'üks aasta',
other: '{{count}} aastat'
},
withPreposition: {
one: 'ühe aasta',
other: '{{count}} aasta'
}
},
overXYears: {
standalone: {
one: 'rohkem kui üks aasta',
other: 'rohkem kui {{count}} aastat'
},
withPreposition: {
one: 'rohkem kui ühe aasta',
other: 'rohkem kui {{count}} aasta'
}
},
almostXYears: {
standalone: {
one: 'peaaegu üks aasta',
other: 'peaaegu {{count}} aastat'
},
withPreposition: {
one: 'peaaegu ühe aasta',
other: 'peaaegu {{count}} aasta'
}
}
};
var formatDistance = function formatDistance(token, count, options) {
var usageGroup = options !== null && options !== void 0 && options.addSuffix ? formatDistanceLocale[token].withPreposition : formatDistanceLocale[token].standalone;
var result;
if (typeof usageGroup === 'string') {
result = usageGroup;
} else if (count === 1) {
result = usageGroup.one;
} else {
result = usageGroup.other.replace('{{count}}', String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + ' pärast';
} else {
return result + ' eest';
}
}
return result;
};
var _default = formatDistance;
exports.default = _default;
module.exports = exports.default;
|