public void Add_one_month()
        {
            DateTime a        = new DateTime(2000, 1, 1);
            DateTime expected = new DateTime(2000, 2, 1);
            DateTime c        = ISO8601Duration.Parse("P1M").AddTo(a);

            Assert.AreEqual(expected, c);
        }
        public void Add_months_avoid_leap()
        {
            DateTime a        = new DateTime(2012, 2, 29);
            DateTime expected = new DateTime(2013, 2, 28);
            DateTime c        = ISO8601Duration.Parse("P12M").AddTo(a);

            Assert.AreEqual(expected, c);
        }
        public void Remove_years()
        {
            DateTime a        = new DateTime(2000, 1, 1);
            DateTime expected = new DateTime(1995, 1, 1);
            DateTime c        = ISO8601Duration.Parse("-P5Y").AddTo(a);

            Assert.AreEqual(expected, c);
        }
        public void Add_days()
        {
            DateTime a        = new DateTime(2000, 1, 1);
            DateTime expected = new DateTime(2000, 1, 11);
            DateTime c        = ISO8601Duration.Parse("P10D").AddTo(a);

            Assert.AreEqual(expected, c);
        }
 public void Init()
 {
     one = ISO8601Duration.Parse("P5Y4M2D");
 }