【DaysToExpiration】
[code]inputs:ExpMonth( numericsimple ),
ExpYear( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ) ;
var0 = DayOfWeek( ExpYear * 10000 + ExpMonth * 100 + 1 ) ;
if var0 < 6 then
var1 = 6 - var0
else
var1 = 7 ;
var2 = var1 + 14 ;
var3 = DateToJulian( ExpYear * 10000 + ExpMonth * 100 + var2 ) ;
var4 = DateToJulian( Date ) ;
DaysToExpiration = var3 - var4 ;
[/code]
页:
[1]