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

Fix quotation for timestamps #515

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

shuheiktgw
Copy link
Collaborator

Closes #430

Before submitting your PR, please confirm the following.

  • Describe the purpose for which you created this PR.
  • Create test code that corresponds to the modification

@shuheiktgw shuheiktgw requested a review from goccy November 9, 2024 22:50
@@ -600,20 +601,23 @@ func ToNumber(value string) *NumberValue {
}
}

func looksLikeTimeValue(value string) bool {
Copy link
Collaborator Author

@shuheiktgw shuheiktgw Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've combine it into the isTimestamp function

@shuheiktgw shuheiktgw removed the request for review from goccy November 9, 2024 22:54
@shuheiktgw shuheiktgw marked this pull request as draft November 9, 2024 22:54
@shuheiktgw shuheiktgw force-pushed the fix_timestamp_quotation branch from cbf7fef to 7a77092 Compare November 10, 2024 06:46
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.12%. Comparing base (8f36c1b) to head (7a77092).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #515      +/-   ##
==========================================
+ Coverage   79.09%   79.12%   +0.02%     
==========================================
  Files          17       17              
  Lines        6110     6104       -6     
==========================================
- Hits         4833     4830       -3     
+ Misses        965      963       -2     
+ Partials      312      311       -1     

@shuheiktgw shuheiktgw marked this pull request as ready for review November 10, 2024 06:51
@shuheiktgw shuheiktgw requested a review from goccy November 10, 2024 06:51
continue
// This is a subset of the formats permitted by the regular expression
// defined at http://yaml.org/type/timestamp.html. Note that time.Parse
// cannot handle: "2001-12-14 21:59:43.10 -5" from the examples.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't you provide a layout to handle this case ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I've actually tried supporting the layout, but Go does not seem to support the "-timezone" representation...

https://go.dev/play/p/a5UvI5cUlJy

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK ! I understand !

@goccy goccy added the waiting owner is waiting for a response label Dec 11, 2024
@goccy
Copy link
Owner

goccy commented Dec 12, 2024

LGTM 👍

@goccy goccy merged commit 83d3e55 into goccy:master Dec 12, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting owner is waiting for a response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strings looking like dates are marshaled without quotes
3 participants