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

Invalid offset error for +0000 #55

Closed
Theo-Rige opened this issue Apr 19, 2024 · 2 comments
Closed

Invalid offset error for +0000 #55

Theo-Rige opened this issue Apr 19, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@Theo-Rige
Copy link

Theo-Rige commented Apr 19, 2024

It seems to have a problem when parsing date in this format 2024-04-16T09:11:07+0000. I got the following error :

Invalid offset: +0000
at  (...node_modules\@formkit\tempo\src\parse.ts:111:18)
at Array.forEach ()
at Module.parse (...node_modules\@formkit\tempo\src\parse.ts:77:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I'm on Nuxt 3.11.2.
Also the error is on the docs :
image

@justin-schroeder justin-schroeder added the documentation Improvements or additions to documentation label Apr 19, 2024
@justin-schroeder
Copy link
Member

@Theo-Rige thanks for pointing this out. A fix for the docs has been pushed out. This is the documented breaking change between 0.0.x and 0.1.x (see: https://github.com/formkit/tempo/releases/tag/v0.1.0). In summary:

Z -> became -> ZZ so to parse +-0000 the format token needs to be ZZ. This was to better align with the pre-existing token ecosystem.

@ghiscoding
Copy link

ghiscoding commented May 3, 2024

@justin-schroeder that error still appears on the docs even though you marked it as complete, and simply adding a missing Z fixes the issue :)

image

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

No branches or pull requests

3 participants