Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

323
Views
Angular: ¿hay alguna forma de saber cuál es el formato de hora del dispositivo del usuario? Sistema 24h vs sistema 12 am/pm

¿Es posible saber si el formato de hora del usuario es el sistema de 24 horas o de 12 horas en Angular? Gracias por adelantado

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tuve que hacer algo similar hace un tiempo, esto es lo que funcionó para mí.

 var date = new Date(Date.UTC(2012, 11, 12, 3, 0, 0)); var dateString = date.toLocaleTimeString(); if (dateString.match(/am|pm/i) || date.toString().match(/am|pm/i) ) { //12 hour clock console.log("12 hour"); } else { //24 hour clock console.log("24 hour"); }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!