Skip to content

format: Anyone getting duplicated time #2746

Answered by fturmel
carolineoliva asked this question in Q&A
Discussion options

You must be logged in to vote

@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

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

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@carolineoliva
Comment options

@fturmel
Comment options

fturmel Nov 3, 2021
Collaborator

@carolineoliva
Comment options

Answer selected by tan75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants