Function toUnix

  • Converts a Date object to a Unix timestamp. The timestamp is rounded down to the nearest whole second for compatibility with BigInt.

    Parameters

    • date: Date

      The Date object to convert.

    Returns number

    The Unix timestamp as an integer.

Generated using TypeDoc