示例#1
0
 /// <summary>
 /// Gets the wikipedian age.
 /// </summary>
 /// <param name="userName">Name of the user.</param>
 /// <param name="channel">The channel the command is requested in. (Retrieves the relevant base wiki)</param>
 /// <returns></returns>
 public TimeSpan getWikipedianAge(string userName, string channel)
 {
     Registration regCommand = new Registration();
     DateTime regdate = regCommand.getRegistrationDate(userName, channel);
     TimeSpan age = DateTime.Now.Subtract(regdate);
     if (regdate.Equals(new DateTime(0001, 1, 1)))
     {
         age = new TimeSpan(0);
     }
     return age;
 }