Skip to content

date: shorten the trailing-abbreviation comment - #16904

Closed
yusufemreboyraz wants to merge 1 commit into
uutils:mainfrom
yusufemreboyraz:date/shorten-abbreviation-comment
Closed

yusufemreboyraz wants to merge 1 commit into
uutils:mainfrom
yusufemreboyraz:date/shorten-abbreviation-comment

Conversation

@yusufemreboyraz

Copy link
Copy Markdown
Contributor

@sylvestre asked for this on #16865: seven lines of comment for five lines of code, and the CST/IST examples are already in the test.

It is two lines now, and the examples stay where they already are, as named cases in test_date_trailing_abbreviation_resolved_against_current_zone.

cargo fmt -- --check is clean and the date suite passes, 244 passed and 0 failed, all seven cases included.

Seven lines of comment for five lines of code. The CST and IST examples it
spelled out are already named cases in
test_date_trailing_abbreviation_resolved_against_current_zone, so the comment
now keeps only the rule.

Follow-up to uutils#16865.
Comment thread src/uu/date/src/date.rs
// the current zone does not go by that abbreviation at this instant does
// the table decide. `zoned` is `date_part` read in `now`'s zone, so its
// timestamp is the instant to ask about.
// Like GNU, resolve an ambiguous abbreviation against the current zone

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Like GNU, resolve an ambiguous abbreviation against the current zone
// Resolve an ambiguous abbreviation against the current zone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants