Skip to content

update: second text review #400

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

Merged
merged 3 commits into from
Jul 15, 2024
Merged

update: second text review #400

merged 3 commits into from
Jul 15, 2024

Conversation

danil-pavlov
Copy link
Contributor

No description provided.

@dkhalanskyjb dkhalanskyjb self-requested a review July 8, 2024 09:11
* in Berlin, despite the fact that the clocks were turned back one hour, so there are, in fact, 25 hours
* between the two date-times.
* in Berlin, even though the clocks were turned back one hour, so there are, in fact, 25 hours
* between the two date/times.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I've looked into it, and it seems like the proper form is "datetime" with no separators: https://en.wiktionary.org/wiki/datetime
I got confused because a spell checker complained about this word.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem I was trying to solve here is the inconsistency between date/time and date-time in changed files in the original PR #367. Now, I've replaced all occurrences with datetime, everywhere except for test files

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is datetime suitable both as the noun and as the adjective? The existence of a separate adjective https://en.wiktionary.org/wiki/date-time#English leaves me with a doubt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's very common for nouns to act as adjectives, modifying other nouns
If we take this specific spelling for the data type, it would be great to keep it consistent throughout the doc, especially since it's a key concept for the library

@@ -223,7 +223,7 @@ public expect class Instant : Comparable<Instant> {
/**
* Returns the number of milliseconds from the epoch instant `1970-01-01T00:00:00Z`.
*
* Any fractional part of millisecond is rounded toward zero to the whole number of milliseconds.
* Any fractional part of a millisecond is rounded toward zero to the whole number of milliseconds.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Any fractional part of a millisecond is rounded toward zero to the whole number of milliseconds.
* Any fractional part of the millisecond is rounded toward zero to the whole number of milliseconds.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"A" here means "any", not a particular millisecond

Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb Jul 12, 2024

Choose a reason for hiding this comment

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

Sure, but it's not an "any" millisecond we're interested in but exactly the one used as the input of this function. EDIT: for example, see the first line of this KDoc: "the number of milliseconds." Not just a number of milliseconds, but the number of milliseconds corresponding to the input.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I disagree, the way it's written right now looks like a general rule, "Any fractional part of a millisecond is rounded toward zero"
if you want to underline the input, it should probably be "Any fractional part of the input is rounded toward zero to the whole number of milliseconds."

@@ -176,7 +176,7 @@ public typealias ZoneOffset = FixedOffsetTimeZone
/**
* Finds the offset from UTC this time zone has at the specified [instant] of physical time.
*
* **Pitfall**: the offset returned from this function should typically not be used for datetime arithmetics,
* **Pitfall**: the offset returned from this function should typically not be used for date/time arithmetics
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably https://en.wiktionary.org/wiki/date-time. Though I do see that this file contains the same choice of words already. Should probably be replaced to date-time and datetime throughout the whole project.

@@ -215,7 +215,7 @@ internal expect fun Instant.toLocalDateTime(offset: UtcOffset): LocalDateTime
/**
* Finds the offset from UTC the specified [timeZone] has at this instant of physical time.
*
* **Pitfall**: the offset returned from this function should typically not be used for datetime arithmetics,
* **Pitfall**: the offset returned from this function should typically not be used for date/time arithmetics
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb left a comment

Choose a reason for hiding this comment

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

Thank you!

@danil-pavlov danil-pavlov merged commit f74fdab into master Jul 15, 2024
1 check passed
@danil-pavlov danil-pavlov deleted the twr-review branch July 15, 2024 15:24
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