Example #1
0
 public void EighteenOrNineteenYears()
 {
     DateDiffImprecise dateDiff = new DateDiffImprecise();
     DateTime date = new DateTime();
     date = DateTime.Parse("1997-11-8");
     int n = dateDiff.Age(date);
     Assert.IsFalse(n < 18);
     Assert.IsFalse(n > 19);
 }
Example #2
0
 public void FiveOrSixYears()
 {
     DateDiffImprecise dateDiff = new DateSpanServer.DateDiffImprecise();
     DateTime date = new DateTime();
     date = DateTime.Parse("2010-11-8");
     int n = dateDiff.Age(date);
     Assert.IsFalse(n < 5);
     Assert.IsFalse(n > 6);
 }
Example #3
0
 public int GetAge(DateTime Date)
 {
     DateDiffImprecise DateDiff = new DateDiffImprecise();
     return DateDiff.Age(Date);
 }