1 parent
8ad4e93ff7
commit
1cb3b708a2
17 files changed
+741
-16
No files matched your search
@@ -24,12 +24,14 @@ export default class extends Helper {
|
||||
*/
|
||||
|
||||
compute([days]) {
|
||||
const remainder = days % 365;
|
||||
if (remainder === 0) {
|
||||
const numberOfYears = days / 365;
|
||||
return this.intl.t('titles.year', { numberOfYears });
|
||||
} else {
|
||||
return this.intl.t('titles.days', { days });
|
||||
if (days > 0) {
|
||||
const remainder = days % 365;
|
||||
if (remainder === 0) {
|
||||
const numberOfYears = days / 365;
|
||||
return this.intl.t('titles.year', { numberOfYears });
|
||||
} else {
|
||||
return this.intl.t('titles.days', { days });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user