formkit / tempo

📆 Parse, format, manipulate, and internationalize dates and times in JavaScript and TypeScript.
https://tempo.formkit.com
MIT License
2.34k stars 30 forks source link

Add support for parsing time zone offsets in the format [+-]HH:mm #39

Closed Toru-Takagi closed 6 months ago

Toru-Takagi commented 6 months ago

support #38

vercel[bot] commented 6 months ago

@Toru-Takagi is attempting to deploy a commit to the Formkit Team on Vercel.

A member of the Team first needs to authorize it.

justin-schroeder commented 6 months ago

This is a good start! We also need the date() object to accept colons in the offset — I’ll merge and iterate!

Toru-Takagi commented 6 months ago

Thank you for your review despite your busy schedule 🙇. Indeed, we need to ensure that the test code below accepts colons as well.

https://github.com/formkit/tempo/blob/28a9539f34c5d74eff8c122b3909a03efe208a1a/src/__tests__/date.spec.ts#L5-L16

I have some time this weekend, so I'll work on it. If this PR has been merged by then, I'll create a new one 🙇.

Toru-Takagi commented 6 months ago

@justin-schroeder Thank you for the review.

I have made corrections to the regular expression and test modifications. Are the changes correct?

I'm sorry for the inconvenience during your busy schedule, but I kindly ask for your confirmation when you have a moment 🙇

https://github.com/formkit/tempo/pull/39/commits/635589a69635d0fcc66918a5f4d0f764c51de9e1

justin-schroeder commented 6 months ago

These look like great changes, thank you for the contribution!