Skip to content

API Reference


API Reference / yearsToExpiry

Function: yearsToExpiry() ​

yearsToExpiry(expiry, now?): number

Defined in: src/analytics/blackScholes.ts:199

Years between now and an expiry date, floored at zero.

Parameters ​

expiry ​

string | Date

now? ​

Date = ...

Returns ​

number

Community project — not affiliated with Dhan. MIT License.