Skip to main content

expiry_to_years

Function expiry_to_years 

Source
pub fn expiry_to_years(underlying: &str, expiry_yyyymmdd: u64) -> f64
Expand description

Convert YYYYMMDD expiry to years-to-expiry from now.

Returns 0.0 if the expiry is in the past or invalid.