コード例 #1
0
 public static int Subtract(Month left, Month right) => left.OffsetFrom(right);
コード例 #2
0
 public static Month Subtract(Month month, int numPeriods) => month.Offset(-numPeriods);
コード例 #3
0
 public static Month Add(Month month, int numPeriods) => month.Offset(numPeriods);
コード例 #4
0
 public int OffsetFrom(Month other)
 {
     return(_value - other._value);
 }
コード例 #5
0
 public bool Equals(Month other)
 {
     // ReSharper disable once ImpureMethodCallOnReadonlyValueField
     return(_value.Equals(other._value));
 }
コード例 #6
0
 public int CompareTo(Month other)
 {
     // ReSharper disable once ImpureMethodCallOnReadonlyValueField
     return(_value.CompareTo(other._value));
 }