Siddhanta Parity API Documentation - v1.3.0
    Preparing search index...
    • Converts multiple date/time formats to AstroTime format.

      Given a Date object or a number days since noon (12:00) on January 1, 2000 (UTC), this function creates an AstroTime object.

      Given an AstroTime object, returns the same object unmodified. Use of this function is not required for any of the other exposed functions in this library, because they all guarantee converting date/time parameters to AstroTime as needed. However, it may be convenient for callers who need to understand the difference between UTC and TT (Terrestrial Time). In some use cases, converting once to AstroTime format and passing the result into multiple function calls may be more efficient than passing in native JavaScript Date objects.

      Parameters

      • date: FlexibleDateTime

        A Date object, a number of UTC days since the J2000 epoch (noon on January 1, 2000), or an AstroTime object. See remarks above.

      Returns AstroTime