question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to date-fns v2

See original GitHub issue

As it ships ES modules we can finally remove all the deep imports and just import directly from date-fns 🎉

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
mattlewis92commented, Aug 23, 2019

I just published a new beta with date-fns v2, please upgrade and try it today with:

npm i angular-calendar@next
3reactions
mattlewis92commented, Oct 24, 2019

@tom-englert date adapters essentially are already separate modules, but just included in the angular-calendar package as sub modules for convenience so you don’t have to npm install even more stuff e.g.

import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';

and

import { adapterFactory } from 'angular-calendar/date-adapters/moment';

The only real benefit having them as separate packages would get you is that you could add peer dependencies to date-fns and moment respectively, but that will mostly be solved with optional peer dependencies, and they would have separate versioning from the main package so I could have already released the date-fns v2 adapter as stable already (but you can already use the next version of the calendar with npm i angular-calendar@next that has date-fns v2.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

date-fns-upgrade - GitHub
A tool for upgrading date-fns versions. Contribute to date-fns/date-fns-upgrade development by creating an account on GitHub.
Read more >
@date-fns/upgrade - npm
A tool for upgrading date-fns versions. Latest version: 1.0.3, last published: 3 years ago. Start using @date-fns/upgrade in your project by ...
Read more >
@date-fns/upgrade - npm Package Health Analysis | Snyk
A tool for upgrading date-fns versions For more information about how to use this package see README · Ensure you're using the healthiest...
Read more >
modern JavaScript date utility library - date-fns
date -fns provides the most comprehensive yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.
Read more >
Updating to v2 date-fns: NaN - Stack Overflow
After the update to the module's v2 this generates the error: date-fns doesn't accept strings as date arguments. Please use 'parseISO' to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found