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

125
Views
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 answers
Answer question

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 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!