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

FeatureReuet: Support for timezone format +-HH:mm in format token. #46

Closed
Toru-Takagi opened this issue Mar 25, 2024 · 1 comment · Fixed by #52
Closed

FeatureReuet: Support for timezone format +-HH:mm in format token. #46

Toru-Takagi opened this issue Mar 25, 2024 · 1 comment · Fixed by #52

Comments

@Toru-Takagi
Copy link
Contributor

Thank you for addressing #38.

Regarding #38, when formatting, the timezone becomes +-HHmm.
I would be happy if I cloud also specify +-HH:mm.

Are there any plans to address this.
If it is addressed, what kind of Format Token is expected to be used?

@justin-schroeder
Copy link
Member

Good question. In general Id like to follow dayjs style tokens (I prefer them to date-fns). However, when writing this library I used Z to indicate +-HHmm where in dayjs Z indicates +-HH:mm. So it seems I’ve stepped in it a bit there. I would certainly be willing to concede this and issue a breaking change in 0.1 (since we are pre 1.0) to address this.

So in summary we should align with dayjs here:

token format
Z +-HH:mm
ZZ +-HHmm

Happy to accept a pull request for this if someone wants to tackle it before I get to it. That said we need to make sure both format and parse are able to handle this new token (it will need its own "part")

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