subtractDuration | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function subtractDuration

    • Subtract a duration (time) from a date

      Parameters

      • startingdate: Date

        Date to start from

      • duration: string | Partial<Duration>

        Duration to subtract (as object or as ISO8601 duration string, eg "P1Y2M3DT4H5M6S")

      Returns Date

    • Subtract a duration (time) from a date

      Parameters

      • startingdate: Instant

        Date to start from

      • duration: string | Partial<Duration>

        Duration to subtract (as object or as ISO8601 duration string, eg "P1Y2M3DT4H5M6S")

      Returns Instant