ember-intl
Version:
Internationalization for Ember projects
11 lines (8 loc) • 300 B
text/typescript
import type { IntlShape } from '@formatjs/intl';
export type FormatDateParameters = Parameters<IntlShape<string>['formatDate']>;
export function formatDate(
intlShape: IntlShape,
...[value, formatOptions]: FormatDateParameters
): string {
return intlShape.formatDate(value, formatOptions);
}