Calculates the number of days until expiration.

Namespace: RightEdge.Common
Assembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)

Syntax

C#
public int CalculateDaysUntilExpiration(
	Nullable<DateTime> currentDate,
	int expMonth,
	int expYear
)
Visual Basic
Public Function CalculateDaysUntilExpiration ( 
	currentDate As Nullable(Of DateTime),
	expMonth As Integer,
	expYear As Integer
) As Integer
Visual C++
public:
int CalculateDaysUntilExpiration(
	Nullable<DateTime> currentDate, 
	int expMonth, 
	int expYear
)
F#
member CalculateDaysUntilExpiration : 
        currentDate : Nullable<DateTime> * 
        expMonth : int * 
        expYear : int -> int 

Parameters

currentDate
Type: System..::..Nullable<(Of <(<'DateTime>)>)>
Sets the "current" date.
expMonth
Type: System..::..Int32
expiration month.
expYear
Type: System..::..Int32
expiration year.

Return Value

Type: Int32
Number of days until expiration.

Remarks

The currentDate parameter can be set to any value as long as it's less than the expMonth and expYear parameters. This is useful in cases where the option price needs to be simulated on a date other than the actual current date.

See Also