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

x/pkgsite: time package displayed incorrectly #50743

Closed
jmooring opened this issue Jan 21, 2022 · 5 comments
Closed

x/pkgsite: time package displayed incorrectly #50743

jmooring opened this issue Jan 21, 2022 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@jmooring
Copy link

Current:

The formats and 002 are space-padded and zero-padded three-character day of year...

Desired:

The formats __2 and 002 are space-padded and zero-padded three-character day of year...

See https://pkg.go.dev/time#pkg-constants

@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed Documentation labels Jan 21, 2022
@ianlancetaylor ianlancetaylor changed the title time: documentation - fix day of the year padding description x/pkgsite: time package displayed incorrectly Jan 21, 2022
@gopherbot gopherbot added this to the pkgsite/unplanned milestone Jan 21, 2022
@ianlancetaylor
Copy link
Contributor

The text in the file is "The formats __2 and 002 are space-padded and zero-padded". However, the display at https://pkg.go.dev/time is "The formats and 002 are space-padded and zero-padded". So somehow the pkgsite code is droppig the "__2". It's not there in the HTML source ("The formats and 002 are space-padded and zero-padded").

@ianlancetaylor
Copy link
Contributor

CC @jamalc

@jamalc jamalc added the pkgsite label Jan 21, 2022
@jamalc jamalc self-assigned this Jan 21, 2022
@jamalc
Copy link

jamalc commented Mar 14, 2022

The documentation matches the src for go1.17. I think part of that comment was accidentally removed. It used to read: The formats 2, _2, and 02 are unpadded, space-padded, and zero-padded day of month. The formats __2 and 002 are space-padded and zero-padded three-character day of year; there is no unpadded day of year format.

@jamalc
Copy link

jamalc commented Mar 14, 2022

It is fixed on master so this should resolve with the next release.

@jamalc jamalc closed this as completed Mar 14, 2022
@ianlancetaylor
Copy link
Contributor

Sorry for not checking 1.17.

Text was broken in https://go.dev/cl/320252, fixed in https://go.dev/cl/349929.

@rsc rsc unassigned jamalc Jun 22, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants