Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add date-fns instead of moment #33

Open
svkorepanov opened this issue Nov 6, 2020 · 4 comments
Open

Add date-fns instead of moment #33

svkorepanov opened this issue Nov 6, 2020 · 4 comments

Comments

@svkorepanov
Copy link

Support plan

  • is this issue currently blocking your project? (no):
  • is this issue affecting a production system? (no):

Context

  • node version: 12.16.1
  • module version: 2.0.1
  • environment (e.g. node, browser, native): browser
  • used with (e.g. hapi application, another framework, standalone, ...): react-hook-form, @hookform/resolvers/joi
  • any other relevant information:

What problem are you trying to solve?

Recently I've faced with date validation via Joi, and luckily I found this library. But unfortunately there is a moment.js in deps and I don't want to bring this library in my project as a dependency. I guess a lot of developers don't want it either. I suggest moving to more modern date library such as date-fns instead of moment.js. And I would happy to help you with this.

Do you have a new or modified API suggestion to solve the problem?

@vicmars5
Copy link

Also, would be good to mention that moment js is deprecated.
https://momentjs.com/docs/

But my main questions would be: does date-fns use the same date format or API as moment.js? If it isn't, this change can break existing code bases if the update the joi-date version.

@Izabrr
Copy link

Izabrr commented Mar 9, 2021

Hi 👋 Any update on this topic ?

@hueniverse
Copy link
Contributor

I don't have time to do the work but if someone wants to open a PR for this, I'll review.

@Izabrr
Copy link

Izabrr commented Mar 10, 2021

@hueniverse I opened this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants