Skip to content

Unclear Documentation for toSeconds() Function #1644

@reid-wheeler

Description

@reid-wheeler

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions