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

Clarify docs for toSecond. #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

zenhack
Copy link

@zenhack zenhack commented Dec 13, 2021

I wasn't 100% sure based on the existing docs whether this was
intended to be analagous to toHour, toMinute, etc, or if it just
converted to posix time in seconds. In hindsight, the latter wouldn't
have made much sense, but I was thrown by the facts that:

  1. All of the other functions which return a value in a range like this
    say "From 0 to ..", but this one doesn't.
  2. The examples don't disambiguate this.

So this patch makes minor improvements to the docs, including the range
for consistency and adding another example that disambiguates.

I wasn't 100% sure based on the existing docs whether this was
intended to be analagous to toHour, toMinute, etc, or if it just
converted to posix time in seconds. In hindsight, the latter wouldn't
have made much sense, but I was thrown by the facts that:

1. All of the other functions which return a value in a range like this
   say "From 0 to ..", but this one doesn't.
2. The examples don't disambiguate this.

So this patch makes minor improvements to the docs, including the range
for consistency and adding another example that disambiguates.
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.

1 participant