Example #1
0
 public TimeSpan AgeFrom(this IBorn birthed, DateTime from)
 {
     return(from - birthed.Birth);
 }
Example #2
0
 public void checkAge(IBorn birthed)
 {
     var age = birthed.Age((new DefaultDateTimeFactory()).Now());
 }
Example #3
0
 public TimeSpan AgeFromNow(this IBorn birthed, IDateTimeFactory dtf)
 {
     return(dtf.Now() - birthed.Birth);
 }