intl-relative-time-format
Version:
A fully spec-compliant polyfill for 'Intl.RelativeTimeFormat'
109 lines (108 loc) • 3.31 kB
JavaScript
if ("__addLocaleData" in Intl.RelativeTimeFormat) {
Intl.RelativeTimeFormat.__addLocaleData({
locale: "eo",
data: {
year: {
'0': 'nuna jaro',
'1': 'venonta jaro',
'-1': 'pasinta jaro',
future: {
one: 'post {0} jaro',
other: 'post {0} jaroj'
},
past: {
one: 'antaŭ {0} jaro',
other: 'antaŭ {0} jaroj'
}
},
quarter: {
'0': 'this quarter',
'1': 'next quarter',
'-1': 'last quarter',
future: {
one: 'post {0} kvaronjaro',
other: 'post {0} kvaronjaroj'
},
past: {
one: 'antaŭ {0} kvaronjaro',
other: 'antaŭ {0} kvaronjaroj'
}
},
month: {
'0': 'nuna monato',
'1': 'venonta monato',
'-1': 'pasinta monato',
future: {
one: 'post {0} monato',
other: 'post {0} monatoj'
},
past: {
one: 'antaŭ {0} monato',
other: 'antaŭ {0} monatoj'
}
},
week: {
'0': 'nuna semajno',
'1': 'venonta semajno',
'-1': 'pasinta semajno',
future: {
one: 'post {0} semajno',
other: 'post {0} semajnoj'
},
past: {
one: 'antaŭ {0} semajno',
other: 'antaŭ {0} semajnoj'
}
},
day: {
'0': 'hodiaŭ',
'1': 'morgaŭ',
'-1': 'hieraŭ',
future: {
one: 'post {0} tago',
other: 'post {0} tagoj'
},
past: {
one: 'antaŭ {0} tago',
other: 'antaŭ {0} tagoj'
}
},
hour: {
'0': 'this hour',
future: {
one: 'post {0} horo',
other: 'post {0} horoj'
},
past: {
one: 'antaŭ {0} horo',
other: 'antaŭ {0} horoj'
}
},
minute: {
'0': 'this minute',
future: {
one: 'post {0} minuto',
other: 'post {0} minutoj'
},
past: {
one: 'antaŭ {0} minuto',
other: 'antaŭ {0} minutoj'
}
},
second: {
'0': 'now',
future: {
one: 'post {0} sekundo',
other: 'post {0} sekundoj'
},
past: {
one: 'antaŭ {0} sekundo',
other: 'antaŭ {0} sekundoj'
}
},
nu: [
'latn'
]
}
});
}