forked from hustcc/timeago.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathro.js
29 lines (27 loc) · 916 Bytes
/
ro.js
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
module.exports = function(number, index) {
var langTable = [
['chiar acum', 'chiar acum'],
['acum %s secunde', 'peste %s secunde'],
['acum un minut', 'peste un minut'],
['acum %s minute', 'peste %s minute'],
['acum o oră', 'peste o oră'],
['acum %s ore', 'peste %s ore'],
['acum o zi', 'peste o zi'],
['acum %s zile', 'peste %s zile'],
['acum o săptămână', 'peste o săptămână'],
['acum %s săptămâni', 'peste %s săptămâni'],
['acum o lună', 'peste o lună'],
['acum %s luni', 'peste %s luni'],
['acum un an', 'peste un an'],
['acum %s ani', 'peste %s ani']
];
if (number < 20) {
return langTable[index];
}
// A `de` preposition must be added between the number and the adverb
// if the number is greater than 20.
return [
langTable[index][0].replace('%s', '%s de'),
langTable[index][1].replace('%s', '%s de'),
];
}