Beispiel #1
0
 /// <summary>
 /// Subtracts given decades from the given DateTime.
 /// </summary>
 /// <param name="date">The given DateTime.</param>
 /// <param name="decades">Number of decades to be subtracted.</param>
 /// <returns>The DateTime after the given decades are subtracted.</returns>
 public static DateTime SubtractDecades(this DateTime date, int decades)
 {
     return(date.AddDecades(decades.Negate()));
 }
Beispiel #2
0
 /// <summary>
 /// Adds one decade to the given DateTime.
 /// </summary>
 /// <param name="date">The given DateTime.</param>
 /// <returns>The DateTime after one decade is added.</returns>
 public static DateTime AddADecade(this DateTime date)
 {
     return(date.AddDecades(1));
 }