go
go copied to clipboard
Expand on parsing and formatting date-time in Golang
I personally had trouble understanding that Jan 2 was a special date and only after a thorough read of the example code in time.Format
figured out how to use this feature in go. Hopefully, the details added hammer in the point about how to represent dates in Go.
This intends to greater emphasizes the point that users have to represent not just any date, but specifically 1-2-3-4-5-6-7 in their desired/custom format. I found the introduction to the time
package a bit more brief than some of the other exercise sets so this also helps make the platform more consistently detailed.
Dear zargold
Thank you for contributing to the Go track on Exercism! π You will see some automated feedback below π€. It would be great if you can make sure your PR covers those points. This will save your reviewer some time and your change can be merged quicker.
-
π The following files usually contain very similar content.
-
concepts/<concept>/about.md
-
concepts/<concept>/introduction.md
-
exercises/concept/<exercise>/.docs/introduction.md
Please check whether the changes you made to one of these also need to be applied to the others.
-
-
π If your PR fully fixes an issue, please include the text
Fixes #issue_no
in any line of the PR description. This will make the issue be automatically be closed when the PR is merged. If your PR is related to an existing issue but does not fix it completely, please link the issue anywhere in the description of the PR with#issue_no
. You can read more about this in Github: Linking a pull request to an issue -
βοΈ If your PR is not related to an existing issue (and is not self-explaining like a typo fix), please make sure the description explains why the change you made is necessary.
-
π€ If your PR fixes an easy to identify typo, if would be great if you could check for that typo in the whole repo. For example, if you found
Unicdoe
, use "replace all" in your editor (or command line magic) to fix it consistently.
Dear Reviewer/Maintainer
-
π Make sure you set the appropriate
x:rep
label for the PR. (This also works after merging, in case you forgot about it.) -
π Don't be too nit-picky. If the PR is a clear improvement compared to the status quo, it should be approved as clear signal this is good to be merged even if the minor comments you might have are not addressed by the contributor. Further improvement ideas can be captured in issues (if important enough) and implemented via additional PRs.
-
π€ After reviewing the diff in the "Files changed" section, take a moment to think about whether there are changes missing from the diff. Does something need to be adjusted in other places so the code or content stays consistent?
Automated comment created by PR Commenter π€.
Thanks for this and sorry for the delay in reviewing this.
This is such a big source of confusion for people learning Go that I feel something like this is really important.
I'd just change the explanation in the following ways:
- In the first paragraph, I think we should talk a little bit less about the
YYYY mm
format of other languages. I think it's good to briefly say that Go is different from other languages, but we should not try to explain how the theYYYY mm
format works, as it might make things even more confusing.- In the second paragraph, instead of relying on a text explanation, what about just give a couple of examples to drive the point home?
Hey. Iβve been also struggling with this concept. This article helped me a lot so maybe itβs worth to consider adding it as a part of the concept documentation.
Also Go by Example states the same if you read carefully(I didnβt): https://gobyexample.com/time-formatting-parsing.
@Jasstkn We already have the yourbasic link in the docs:
https://github.com/exercism/go/blob/ec502cb0bca355905f2fdd9e58c9eb3fe671a518/concepts/time/links.json#L14-L17
Or are you thinking of somewhere else?
Closing this as it seems abandoned and requires some more work to get right. I created an issue so maybe some else will pick this up.