Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

91
Vistas
Angular Date Pipe en-NZ

I am using the angular date picker and have set the locale to en-NZ in the app module like so.

  {
        provide: LOCALE_ID,
        deps: [LocaleService],      //some service handling global settings
        useFactory: (LocaleService: { locale: string; }) => LocaleService.locale
    },

I am using the shortDateFromat but angular date pipe is not formating to the correct locale.

Expected: 6/9/21
Actual: 9/6/21

It appears that it is always formatting to the en-US locale.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can add in your app.module.ts this:

import {  LOCALE_ID } from '@angular/core';
...
@NgModule({
  providers: [{ provide: LOCALE_ID, useValue: 'en-nz' }],
})

It works for me.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda