Ejemplo n.º 1
0
 /// <summary>
 /// Subtracts given centuries from the given DateTime.
 /// </summary>
 /// <param name="date">The given DateTime.</param>
 /// <param name="centuries">Number of centuries to be subtracted.</param>
 /// <returns>The DateTime after the given centuries are subtracted.</returns>
 public static DateTime SubtractCenturies(this DateTime date, int centuries)
 {
     return(date.AddCenturies(centuries.Negate()));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds one century to the given DateTime.
 /// </summary>
 /// <param name="date">The given DateTime.</param>
 /// <returns>The DateTime after one century is added.</returns>
 public static DateTime AddACentury(this DateTime date)
 {
     return(date.AddCenturies(1));
 }