public void PlusWeeks_Simple()
        {
            LocalDateTime start            = new LocalDateTime(2011, 4, 2, 12, 15, 8);
            LocalDateTime expectedForward  = new LocalDateTime(2011, 4, 23, 12, 15, 8);
            LocalDateTime expectedBackward = new LocalDateTime(2011, 3, 12, 12, 15, 8);

            Assert.AreEqual(expectedForward, start.PlusWeeks(3));
            Assert.AreEqual(expectedBackward, start.PlusWeeks(-3));
        }
Esempio n. 2
0
 public void PlusWeeks()
 {
     SampleStartDateTime.PlusWeeks(3);
 }
Esempio n. 3
0
 public LocalDateTime PlusWeeks() => Sample.PlusWeeks(3);
 public void PlusWeeks()
 {
     Sample.PlusWeeks(3).Consume();
 }
 public void PlusWeeks_Simple()
 {
     LocalDateTime start = new LocalDateTime(2011, 4, 2, 12, 15, 8);
     LocalDateTime expectedForward = new LocalDateTime(2011, 4, 23, 12, 15, 8);
     LocalDateTime expectedBackward = new LocalDateTime(2011, 3, 12, 12, 15, 8);
     Assert.AreEqual(expectedForward, start.PlusWeeks(3));
     Assert.AreEqual(expectedBackward, start.PlusWeeks(-3));
 }
 public LocalDateTime PlusWeeks()
 {
     return(Sample.PlusWeeks(3));
 }
Esempio n. 7
0
 public IDateTime PlusWeeks(int weeks)
 {
     return(new DateTime(_localDateTime.PlusWeeks(weeks)));
 }
 /// <summary>
 /// Add weeks
 /// </summary>
 /// <param name="ld"></param>
 /// <param name="weeks"></param>
 /// <returns></returns>
 public static LocalDateTime AddWeeks(this LocalDateTime ld, int weeks) => ld.PlusWeeks(weeks);