import duration from "dayjs/plugin/duration"; import isSameOrAfter from "dayjs/plugin/isSameOrAfter"; import isSameOrBefore from "dayjs/plugin/isSameOrBefore"; import minMax from "dayjs/plugin/minMax"; import relativeTime from "dayjs/plugin/relativeTime"; import timezone from "dayjs/plugin/timezone"; import utc from "dayjs/plugin/utc"; import weekOfYear from "dayjs/plugin/weekOfYear"; import "dayjs/locale/pt-br"; export const definirDayjsbr = (dayjsEntrada) => { dayjsEntrada.locale("pt-br"); dayjsEntrada.extend(utc); dayjsEntrada.extend(timezone); dayjsEntrada.extend(weekOfYear); dayjsEntrada.extend(isSameOrBefore); dayjsEntrada.extend(isSameOrAfter); dayjsEntrada.extend(minMax); dayjsEntrada.extend(relativeTime); dayjsEntrada.extend(duration); return dayjsEntrada; };