format: Anyone getting duplicated time #2746
-
Hi guys! We are seeing something strange when calling format function. For instance: This is how we are calling the format function: format(date, 'eeee', { locale: ptBR }) Anyone else? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@carolineoliva Could you share a more complete example? The https://date-fns.org/v2.25.0/docs/format import { format } from "date-fns";
import { ptBR } from "date-fns/locale";
const date = new Date(2021, 10, 3);
const res = format(date, "eeee", { locale: ptBR });
console.log(res); // quarta-feira |
Beta Was this translation helpful? Give feedback.
@carolineoliva Could you share a more complete example? The
eeee
token should only be returning the day of the week and not time related information.https://date-fns.org/v2.25.0/docs/format