|
From: Irakli M. <ima...@ho...> - 2010-12-15 16:29:22
|
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
|