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

Date validation failed with Timezone (related to DayJS issue) #73

Open
crbast opened this issue Sep 28, 2024 · 2 comments
Open

Date validation failed with Timezone (related to DayJS issue) #73

crbast opened this issue Sep 28, 2024 · 2 comments

Comments

@crbast
Copy link

crbast commented Sep 28, 2024

Package version

2.1.0

Describe the bug

When validating a date with a format containing the symbol Z (see https://day.js.org/docs/en/display/format#list-of-all-available-formats) it will fail.

This issue seems to be related on DayJS latest version. Here some tickets open on their github :

Here an example to test :

  vine.object({
    startDateTime: vine
      .date({
        formats: ['YYYY-MM-DD[T]HH:mmZ'],
      })
  })

input : "startDateTime": "2024-09-11T14:20+0200"

I wish you all a lovely day :)

Reproduction repo

No response

@mahfuz271

This comment was marked as off-topic.

@thetutlage
Copy link
Contributor

Seems like a lot of issues coming from DayJS. Maybe, we should consider moving a more stable (yet small) library for dates parsing

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

3 participants