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.

Date library dependency in v8

See original GitHub issue

DayPicker relies on some date manipulation functions to work. Until v8 I’ve been maintaining a custom set of utilities to keep the bundle size small.

I underestimated the difficulties working with dates and other abstractions required to support localization, so I decided to switch to date-fns.

This choice is raising some valid concerns in the community, which I would like to collect here.

References:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
gpblcommented, Jan 28, 2020

I think the main issue here are localization-based calculations (eg first day of the week). I’d go with date-fns and study the problem with a lower priority. There are many options out there! I really want to push date-fns, it is good for the ecosystem.

Different approaches can be tried after the release. But i’d better discuss real use cases like yours first…

1reaction
hornetDCcommented, Oct 15, 2020

Is it possible to somehow use v8 without date-fns? We are using dayjs in our project, v7’s formatDate and parseDate props are very convenient. I don’t want to bring extra dependency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intl.RelativeTimeFormat - V8 JavaScript engine
Intl.RelativeTimeFormat enables localized formatting of relative times without sacrificing performance.
Read more >
Support Library Packages - Android Developers
v8 Support Library​​ This library provides specific feature sets and can be included in your application independently from other libraries.
Read more >
Chapter 18 The V8 Engine | JavaScript for R
To use NPM packages we need browserify, a node library to bundle all dependencies of an NPM package into a single file, which...
Read more >
Date-fns vs MomentJS: Choosing the Right Date Utility Library
MomentJS is one of the most used JavaScript date libraries among software ... (on the right, its dependency graph, auto-generated by Bit) ...
Read more >
npm-outdated
Use --all to find all outdated meta-dependencies as well. ... no semver range) will install whatever's tagged as latest . once is just...
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