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

Unclear Documentation for toSeconds() Function #1644

Closed
reid-wheeler opened this issue Jul 9, 2024 · 2 comments
Closed

Unclear Documentation for toSeconds() Function #1644

reid-wheeler opened this issue Jul 9, 2024 · 2 comments

Comments

@reid-wheeler
Copy link

reid-wheeler commented Jul 9, 2024

Is your feature request related to a problem? Please describe.
It is unclear in the documentation that the toSeconds() function returns a floating point number.

Describe the solution you'd like
Update the documentation to read: "Returns the epoch seconds (as a floating point number) of this DateTime."

Describe alternatives you've considered
N/A

Additional context
Most datetime libraries return a whole number to represent seconds from Epoch. It would clear up some confusion (which I have seen from multiple people online) if the documentation for the toSeconds() function mentioned that it returns a floating point number. toUnixInteger() specifies that it is a whole number, and I believe toSeconds() should make a similar distinction.

@1dylan1
Copy link
Contributor

1dylan1 commented Jan 31, 2025

Relevant previous discussion on same topic here for this interested: #565

I've submitted a pull request here that updates the docstring to avoid any further confusion: #1681

@reid-wheeler
Copy link
Author

Relevant previous discussion on same topic here for this interested: #565

I've submitted a pull request here that updates the docstring to avoid any further confusion: #1681

Thank you!

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

No branches or pull requests

3 participants