Below is the sample (in C# but hopefully context is clear)
Calendar cal = new
UnitedStates(UnitedStates.Market.GovernmentBond);
Date dec30 = new Date(30, Month.December , 2010);
Date d2mf = cal.advance(dec30, new Period(2, TimeUnit.Days),
BusinessDayConvention.ModifiedFollowing);
Date d2f = cal.advance(dec30, new Period(2, TimeUnit.Days),
BusinessDayConvention.Following);
Console.WriteLine("ModifiedFollowing -- {0}", d2mf.__str__());
Console.WriteLine("Following -- {0}", d2f.__str__());
ModifiedFollowing -- January 3rd, 2011 //I would expect to see Dec 31 for
ModifiedFollowing
Following -- January 3rd, 2011
Regards
Irakli
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev