1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular DatePipe with locale usage

Discussão em 'Angular' iniciado por LeO, Setembro 9, 2025.

  1. LeO

    LeO Guest

    I want to display the date in HTML depending on the set/used locale. For display purposes I want to display it in English or German - depending on the users decision. This means the user select the locale 'de' or 'en'.

    The default way to display the date is

    <span>{{ data.selDate | date: "mediumDate" }}</span>


    According to the documentation I have {{ value_expression | date [ : format [ : timezone [ : locale ] ] ] }}. But this code won't work

    <span>{{ data.selDate | date: "mediumDate" :'':"de-DE" }}</span>
    <span>{{ data.selDate | date: "mediumDate" :undefined:"de-DE" }}</span>


    How to specify it in the DatePipe?

    Continue reading...

Compartilhe esta Página