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

121
Visualizações
Datejs lib not working after Upgrade to J-Query 3.x

I have a node.js project where we are using the following lib.

https://github.com/datejs/Datejs

After a recent update of our local J-Query file from 1.9.1 to 3.6.0 this lib stopped working.

Sample Code

    var today = Date.today();

Errors

TypeError: Date.today is not a function at Object. (main.js:8:126614)

Cannot read properties of undefined (reading 'includes')

TypeError: i.add is not a function

When I change the code to

var today = new Date();
var numberOfDays = today.add(5).days();

Then there is a problem with the add method, see the error listed above.

Question, is there anyway to make this lib work with the latest J-Query? The repo appears old and stale, no new releases since 2007, is there any other similar libs that I could try?

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

0

Sorry, I think I finally found the answer.

var parsedate = require('datejs');

Basically, this line was previously removed to help clean-up un-used variables, the previous Jquery upgrade caused issues with the loading order of some of our js files. Although parsedate is never used, this line is still needed to include the datejs lib.

#Winning #TigerBlood

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