Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
Does (new Date()).getFullYear() in Thailand return 2022 or 2056?

Thailand uses a different calendar and in Java date.format returns 2056. I have to make sure it matches my JavaScript code. What does this return in Thailand, 2022 or 2056?

(new Date()).getFullYear()

I know there's UTC time but my context is a bit limited.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In Thailand, there are 2 calendars; the normal Gregorian Calendar (solar-based) and the Buddhist Calendar (lunar-based) as called the Thai lunar calendar.

Javascript Date() will return the Gregorian Date. So, today is 11 March 2022.

If you use Intl.DateTimeFormat as specify the Thai buddhist calendar:

console.log(new Intl.DateTimeFormat('en-US-u-ca-buddhist').format(new Date()));

it will return "3/11/2565 BE" which is the 11th day of Month 3 of the year 2565.

Note: This year is year 2565 in the Thai lunar calendar.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda