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

98
Views
¿Obtener el mes actual en Eleventy usando Nunjucks?

Solo trato de obtener el mes actual en Eleventy con un código abreviado pero tengo algunos problemas.

Aquí es donde estoy:

 config.addShortcode("month", () => { let d = new Date(); let month = new Array(); month[0] = "January"; month[1] = "February"; month[2] = "March"; month[3] = "April"; month[4] = "May"; month[5] = "June"; month[6] = "July"; month[7] = "August"; month[8] = "September"; month[9] = "October"; month[10] = "November"; month[11] = "December"; var n = month[d.getMonth()]; return n; })

Todas las respuestas son muy apreciadas, gracias :)

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

0

De esta manera es más fácil.

 const currentMonth = (new Date()).toLocaleString('en-US', {month: 'long'}); console.log(currentMonth);

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!