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

feat: new docs review #386

Closed
wants to merge 9 commits into from
Closed

feat: new docs review #386

wants to merge 9 commits into from

Conversation

danil-pavlov
Copy link
Contributor

No description provided.

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! I've merged most of the changes proposed here directly to #367.

@@ -77,7 +77,7 @@ import kotlinx.serialization.Serializable
* LocalDateTime(date, time)
* ```
*
* Some additional constructors that accept the date's and time's fields directly are provided for convenience.
* Some additional constructors that accept the date and time fields directly are provided for convenience.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The idea here is that you can either pass the contents of the date and time fields (like above) or pass the fields of the date and the fields of the time. Hence the possessive form. Without it, I don't think the difference between the two approaches is highlighted. Maybe there's a better way to word this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To avoid confusion, I think it's better to write it explicitly:

"Some additional constructors that directly accept the values (or content) from date and time fields are provided for convenience."

* This class does not describe specific *moments in time*, which are represented as [Instant] values.
* Instead, its instances can be thought of as clock readings, something that someone could observe in their time zone.
* For example, `2020-08-30T18:43` is not a *moment in time*, since someone in Berlin and someone in Tokyo would witness
* This class does not describe specific *moments in time* represented as [Instant] values.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The idea: "This class does not describe specific moments in time. Instant is the thing that represents moments in time; if you reach for LocalDateTime for this use case, don't; use Instant instead". I think the proposed version doesn't convey that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, what about "This class does not describe specific moments in time. For that, use [Instant] values instead."

@@ -13,7 +13,7 @@ import kotlinx.serialization.Serializable
* The date part of [LocalDateTime].
*
* This class represents dates without a reference to a particular time zone.
* As such, these objects may denote different spans of time in different time zones: for someone in Berlin,
* As such, these objects may denote different periods in different time zones: for someone in Berlin,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is probably a correct change, but this could interfere with us already having the concept of a "period" in the library: our "periods" are things like "1 day, 2 hours", without an established starting point, but here, the word "period" is used in the sense of "the period between 2020 and 2021", not "the period of 4 years". Is there some other phrasing that's natural but doesn't interfere with the terminology we establish?

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 see, maybe 'time intervals' or 'time frames' would fit better here

@@ -218,7 +218,7 @@ public expect class LocalDate : Comparable<LocalDate> {

/**
* Compares `this` date with the [other] date.
* Returns zero if this date represents the same day as the other (i.e., equal to other),
* Returns zero if this date represents the same day as the other (for example, equal to other),
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's not "e.g.", that's "i.e."
We could replace this with something like "in other words" if "i.e." is undesirable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the clarification, here are several options:
(meaning they're equal to each other)
(with equal values)
(equal to one another)

dkhalanskyjb added a commit that referenced this pull request Apr 30, 2024
@dkhalanskyjb
Copy link
Collaborator

Added the new suggestions in e6b758e

Base automatically changed from doc-improvements to master May 13, 2024 11:12
@dkhalanskyjb
Copy link
Collaborator

Most of the proposed changes were already merged, and rebasing this PR would be difficult, so there seems to be no reason to keep it.

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