phanpy/src/utils/i18n-duration.js
Lim Chee Aun c2e6d732c4 Initial i18n dev
Expecting bugs!
2024-08-13 15:26:23 +08:00

10 lines
206 B
JavaScript

import { i18n } from '@lingui/core';
export default function i18nDuration(duration, unit) {
return () =>
i18n.number(duration, {
style: 'unit',
unit,
unitDisplay: 'long',
});
}