UNPKG

react-intlayer

Version:

Easily internationalize i18n your React applications with type-safe multilingual content management.

14 lines 408 B
import { date } from "@intlayer/core"; import { IntlayerServerContext } from "../IntlayerServerProvider.mjs"; import { getServerContext } from "../serverContext.mjs"; const useDate = () => { const locale = getServerContext(IntlayerServerContext); return (...args) => date(args[0], { ...args[1], locale: args[1]?.locale ?? locale }); }; export { useDate }; //# sourceMappingURL=useDate.mjs.map