Date-fns issue failed to resolve module specifier
I’m trying to practice using date-fns library (not using React just simple HTML page)
But when i’m trying to load it it’s saying
Date-fns addDays function does not add correct number of days
I am currently working with the date-fns library in JavaScript and I am encountering an unexpected behavior when trying to add days to a date. The issue arises in the createComparisonChart function, where the calculateDataForPeriod function is called in two different scopes.
I was using the format function in date-fns without issue, then I started getting an error message
This is my code that was working correctly: