Business Day Convention in Calendar Does not Seem to work

Posted by imachabeli on
URL: http://quantlib.414.s1.nabble.com/Business-Day-Convention-in-Calendar-Does-not-Seem-to-work-tp13082.html

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